Search in sources :

Example 1 with ReportsParamsMapActionForm

use of org.mifos.reports.struts.actionforms.ReportsParamsMapActionForm in project head by mifos.

the class ReportsParamsMapAction method deleteParamsMap.

/**
     * Controls the deletion of a link between Parameter and a report
     */
public ActionForward deleteParamsMap(ActionMapping mapping, ActionForm form, @SuppressWarnings("unused") HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    logger.debug("In ReportsParamsAction:deleteParams Method: ");
    ReportsParamsMapActionForm actionForm = (ReportsParamsMapActionForm) form;
    ReportsParamsMapValue objParams = new ReportsParamsMapValue();
    objParams.setMapId(actionForm.getMapId());
    reportsPersistence.deleteReportsParamsMap(objParams);
    return mapping.findForward("reportparamsmap_path");
}
Also used : ReportsParamsMapValue(org.mifos.reports.business.ReportsParamsMapValue) ReportsParamsMapActionForm(org.mifos.reports.struts.actionforms.ReportsParamsMapActionForm)

Example 2 with ReportsParamsMapActionForm

use of org.mifos.reports.struts.actionforms.ReportsParamsMapActionForm in project head by mifos.

the class ReportsParamsMapAction method createParamsMap.

/**
     * Controls the creation of a link between parameter and a report
     */
public ActionForward createParamsMap(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    logger.debug("In ReportsParamsAction:createParamsMap Method: ");
    ReportsParamsMapActionForm actionForm = (ReportsParamsMapActionForm) form;
    ReportsParamsMapValue objParams = new ReportsParamsMapValue();
    objParams.setReportId(actionForm.getReportId());
    objParams.setParameterId(actionForm.getParameterId());
    String error = reportsBusinessService.createReportsParamsMap(objParams);
    request.getSession().setAttribute("addError", error);
    return mapping.findForward("reportparamsmap_path");
}
Also used : ReportsParamsMapValue(org.mifos.reports.business.ReportsParamsMapValue) ReportsParamsMapActionForm(org.mifos.reports.struts.actionforms.ReportsParamsMapActionForm)

Example 3 with ReportsParamsMapActionForm

use of org.mifos.reports.struts.actionforms.ReportsParamsMapActionForm in project head by mifos.

the class ReportsParamsMapAction method loadAddList.

/**
     * Loads the Parameter Map AddList page
     */
public ActionForward loadAddList(ActionMapping mapping, ActionForm form, HttpServletRequest request, @SuppressWarnings("unused") HttpServletResponse response) throws Exception {
    logger.debug("In ReportsParamsMapAction:load Method: ");
    request.getSession().setAttribute("listOfAllParameters", new ReportsPersistence().getAllReportParams());
    ReportsParamsMapActionForm actionForm = (ReportsParamsMapActionForm) form;
    String strReportId = request.getParameter("reportId");
    if (strReportId == null) {
        strReportId = actionForm.getReportId() + "";
    }
    if (strReportId.equals("")) {
        strReportId = "0";
    }
    int reportId = Integer.parseInt(strReportId);
    actionForm.setReportId(reportId);
    request.getSession().setAttribute("listOfAllParametersForReportId", reportsPersistence.findParamsOfReportId(reportId));
    return mapping.findForward(ReportsConstants.ADDLISTREPORTSPARAMSMAP);
}
Also used : ReportsPersistence(org.mifos.reports.persistence.ReportsPersistence) ReportsParamsMapActionForm(org.mifos.reports.struts.actionforms.ReportsParamsMapActionForm)

Aggregations

ReportsParamsMapActionForm (org.mifos.reports.struts.actionforms.ReportsParamsMapActionForm)3 ReportsParamsMapValue (org.mifos.reports.business.ReportsParamsMapValue)2 ReportsPersistence (org.mifos.reports.persistence.ReportsPersistence)1