public ActionForward printAllReportTracking( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ActionForward actionForward = mapping.findForward(Constants.MAPPING_BASIC); ReportTrackingLookupForm lookupForm = (ReportTrackingLookupForm) form; List<Printable> printableArtifactLists = new ArrayList<Printable>(); Map<String, String> allFields = new HashMap<String, String>(lookupForm.getFields()); List<ReportTracking> detailResults = getReportTrackingDao().getDetailResults(allFields, lookupForm.getDetailFields()); for (ReportTracking detailResult : detailResults) { AwardReportTracking printables = new AwardReportTracking(); printables = getReportTrackingPrintingService() .getReportPrintable( ReportTrackingType.AWARD_REPORT_TRACKING, detailResult, printables); printableArtifactLists.add((AwardReportTracking) printables.clone()); } org.kuali.kra.proposaldevelopment.bo.AttachmentDataSource attachmentDataSource = getReportTrackingPrintingService().printAwardReportTracking(printableArtifactLists); streamToResponse(attachmentDataSource, response); actionForward = RESPONSE_ALREADY_HANDLED; return actionForward; }
public ActionForward moveDetailColumns( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ReportTrackingLookupForm lookupForm = (ReportTrackingLookupForm) form; String fieldName = lookupForm.getMoveField(); Integer newIndex = lookupForm.getNewColumnIndex(); Integer oldIndex = lookupForm.getDetailFields().indexOf(fieldName); if (newIndex >= 0 && oldIndex >= 0) { lookupForm.getDetailFields().remove(fieldName); if (newIndex > oldIndex) { newIndex--; } lookupForm.getDetailFields().add(newIndex, fieldName); } return mapping.findForward(Constants.MAPPING_BASIC); }
public ActionForward getDetails( ActionMapping mapping, ActionForm form, HttpServletRequest request, HttpServletResponse response) throws Exception { ReportTrackingLookupForm lookupForm = (ReportTrackingLookupForm) form; LookupUtils.preProcessRangeFields(lookupForm.getFields()); Map<String, String> allFields = new HashMap<String, String>(lookupForm.getFields()); populateAggregateValues( lookupForm.getGroupedByResults().get(lookupForm.getGroupByResultIndex()), allFields, lookupForm.getGroupedByFields()); List<ReportTracking> detailResults = getReportTrackingDao().getDetailResults(allFields, lookupForm.getDetailFields()); lookupForm.setDetailResults(detailResults); return mapping.findForward("ajaxDetails"); }