private void addTemplates(ReportListVo voReportList, DynamicGridRow reportRow) { for (int i = 0; voReportList.getTemplatesIsNotNull() && i < voReportList.getTemplates().size(); i++) { ReportTemplateLiteVo reportTemplateLiteVo = voReportList.getTemplates().get(i); if(reportTemplateLiteVo != null && Boolean.TRUE.equals(reportTemplateLiteVo.getIsActive())) { DynamicGridRow templateRow = reportRow.getRows().newRow(); templateRow.setValue(reportTemplateLiteVo); templateRow.setCollapsedImage(form.getImages().Core.TemplateReport); templateRow.setExpandedImage(form.getImages().Core.TemplateReport); DynamicGridCell cellTemplateName = createCell(templateRow, getColumn(COLUMN_NAME)); cellTemplateName.setValue(reportTemplateLiteVo.getName()); //DynamicGridCell cellTemplateDescription = createCell(templateRow, getColumn(COLUMN_DESCRIPTION)); //cellTemplateDescription.setValue(reportTemplateLiteVo.getDescription()); if(voReportList.getImsIdIsNotNull() && voReportList.getImsId().intValue() > 0) { templateRow.setTextColor(Color.Blue); } } } }
private void addReport(DynamicGridRow rowParent, ReportListVo voReportList) { DynamicGridRow reportRow = null; if (rowParent == null) reportRow = form.dyngrdReports().getRows().newRow(); else reportRow = rowParent.getRows().newRow(); reportRow.setValue(voReportList); reportRow.setSelectable(false); reportRow.setCollapsedImage(form.getImages().Core.ReportDesigner); reportRow.setExpandedImage(form.getImages().Core.ReportDesigner); DynamicGridCell cellName = createCell(reportRow, getColumn(COLUMN_NAME)); cellName.setValue(voReportList.getReportName()); DynamicGridCell cellDescription = createCell(reportRow, getColumn(COLUMN_DESCRIPTION)); cellDescription.setValue(voReportList.getReportDescription()); addTemplates(voReportList, reportRow); }
private void addTemplates(ReportListVo voReportList, DynamicGridRow reportRow) { for (int i = 0; voReportList.getTemplatesIsNotNull() && i < voReportList.getTemplates().size(); i++) { if (Boolean.FALSE.equals(voReportList.getTemplates().get(i).getIsActive())) //WDEV-16693 continue; ReportTemplateLiteVo reportTemplateLiteVo = voReportList.getTemplates().get(i); DynamicGridRow templateRow = reportRow.getRows().newRow(); templateRow.setValue(reportTemplateLiteVo); templateRow.setCollapsedImage(form.getImages().Core.TemplateReport); templateRow.setExpandedImage(form.getImages().Core.TemplateReport); DynamicGridCell cellTemplateName = createCell(templateRow, getColumn(COLUMN_NAME)); cellTemplateName.setValue(reportTemplateLiteVo.getName()); DynamicGridCell cellTemplateDescription = createCell(templateRow, getColumn(COLUMN_DESCRIPTION)); cellTemplateDescription.setValue(reportTemplateLiteVo.getDescription()); } }
private Integer getReport(String reportName, DynamicGridRow dynamicGridRow) { if (reportName == null || dynamicGridRow == null) return null; if (dynamicGridRow.getValue() instanceof ReportListVo) { ReportListVo reportListVo = ((ReportListVo) dynamicGridRow.getValue()); if (reportListVo.getReportName().toUpperCase().lastIndexOf(reportName.toUpperCase()) >= 0) { int initialIndex = form.getLocalContext().getLastSearchIndexIsNotNull() ? form.getLocalContext().getLastSearchIndex().intValue() : INDEX_START.intValue(); Integer lastIndex = form.getLocalContext().getFlatIndex(); if (lastIndex.equals(INDEX_START) == false && lastIndex != null && lastIndex.intValue() <= initialIndex) return INDEX_START; expandParents(dynamicGridRow); dynamicGridRow.setBackColor(Color.LightGray); return lastIndex; } } return INDEX_START; }
private void addTemplates(ReportListVo voReportList, DynamicGridRow reportRow) { for (int i = 0; voReportList.getTemplatesIsNotNull() && i < voReportList.getTemplates().size(); i++) { ReportTemplateLiteVo reportTemplateLiteVo = voReportList.getTemplates().get(i); DynamicGridRow templateRow = reportRow.getRows().newRow(); templateRow.setValue(reportTemplateLiteVo); templateRow.setCollapsedImage(form.getImages().Core.TemplateReport); templateRow.setExpandedImage(form.getImages().Core.TemplateReport); DynamicGridCell cellTemplateName = createCell(templateRow, getColumn(COLUMN_NAME)); cellTemplateName.setValue(reportTemplateLiteVo.getName()); if(voReportList.getImsIdIsNotNull() && voReportList.getImsId().intValue() > 0) { templateRow.setTextColor(Color.Blue); } } }
private void addTemplates(ReportListVo voReportList, DynamicGridRow reportRow) { for (int i = 0; voReportList.getTemplatesIsNotNull() && i < voReportList.getTemplates().size(); i++) { if(voReportList.getTemplates().get(i) != null && !Boolean.TRUE.equals(voReportList.getTemplates().get(i).getIsActive()))//WDEV-23494 continue; ReportTemplateLiteVo reportTemplateLiteVo = voReportList.getTemplates().get(i); DynamicGridRow templateRow = reportRow.getRows().newRow(); templateRow.setValue(reportTemplateLiteVo); templateRow.setCollapsedImage(form.getImages().Core.TemplateReport); templateRow.setExpandedImage(form.getImages().Core.TemplateReport); DynamicGridCell cellTemplateName = createCell(templateRow, getColumn(COLUMN_NAME)); cellTemplateName.setValue(reportTemplateLiteVo.getName()); if(voReportList.getImsIdIsNotNull() && voReportList.getImsId().intValue() > 0) { templateRow.setTextColor(Color.Blue); } } }
private void populateReports(ReportListVoCollection reportColl) { if (reportColl == null) return; for (int i = 0; i < reportColl.size(); i++) { ReportListVo voReportList = reportColl.get(i); DynamicGridRow row = getReportRow(form.dyngrdReports().getRows(), voReportList); addReport(row, voReportList); } }
private DynamicGridRow getReportRow(DynamicGridRowCollection parentRows, ReportListVo voReportList) { if (parentRows == null) return null; for (int i = 0; i < parentRows.size(); i++) { DynamicGridRow dynamicGridRow = parentRows.get(i); Object value = dynamicGridRow.getValue(); if (value instanceof ReportsCategoryListVo) { ReportsCategoryListVo voReportsCategory = (ReportsCategoryListVo) value; if (voReportsCategory.getReports().indexOf(voReportList) >= 0) { return dynamicGridRow; } } if (dynamicGridRow.getRows() != null && dynamicGridRow.getRows().size() > 0) { DynamicGridRow row = getReportRow(dynamicGridRow.getRows(), voReportList); if (row != null) return row; } } return null; }
private void addReport(DynamicGridRow rowParent, ReportListVo voReportList) { DynamicGridRow reportRow = null; if(voReportList.getTemplatesIsNotNull() && voReportList.getTemplates().size() == 0) return; if (rowParent == null) reportRow = form.dyngrdReports().getRows().newRow(); else reportRow = rowParent.getRows().newRow(); reportRow.setValue(voReportList); reportRow.setSelectable(false); reportRow.setCollapsedImage(form.getImages().Core.ReportDesigner); reportRow.setExpandedImage(form.getImages().Core.ReportDesigner); DynamicGridCell cellName = createCell(reportRow, getColumn(COLUMN_NAME)); cellName.setValue(voReportList.getReportName()); if(voReportList.getImsIdIsNotNull() && voReportList.getImsId().intValue() > 0) { reportRow.setTextColor(Color.Blue); } //DynamicGridCell cellDescription = createCell(reportRow, getColumn(COLUMN_DESCRIPTION)); //cellDescription.setValue(voReportList.getReportDescription()); addTemplates(voReportList, reportRow); }
private void populateReports(ReportListVoCollection coll) { if (coll == null) return; for (int i = 0; i < coll.size(); i++) { ReportListVo voReportList = coll.get(i); DynamicGridRow row = getReportRow(form.dyngrdReports().getRows(), voReportList); addReport(row, voReportList); } }
private void addReport(DynamicGridRow rowParent, ReportListVo voReportList) { DynamicGridRow reportRow = null; if(voReportList.getTemplatesIsNotNull() && voReportList.getTemplates().size() == 0) return; if (rowParent == null) reportRow = form.dyngrdReports().getRows().newRow(); else reportRow = rowParent.getRows().newRow(); reportRow.setValue(voReportList); reportRow.setSelectable(false); reportRow.setCollapsedImage(form.getImages().Core.ReportDesigner); reportRow.setExpandedImage(form.getImages().Core.ReportDesigner); DynamicGridCell cellName = createCell(reportRow, getColumn(COLUMN_NAME)); cellName.setValue(voReportList.getReportName()); if(voReportList.getImsIdIsNotNull() && voReportList.getImsId().intValue() > 0) { reportRow.setTextColor(Color.Blue); } addTemplates(voReportList, reportRow); }
public ReportListVo getReport(ReportBoRefVo voRef) { DomainFactory factory = getDomainFactory(); ReportBo dom = (ReportBo)factory.getDomainObject(ReportBo.class, voRef.getID_ReportBo()); ReportListVo vo = ReportListVoAssembler.create(dom); return vo; }