@Override protected void onQmbReportsTextSubmited(String value) throws PresentationLogicException { form.qmbReports().clear(); ReportTemplateLiteVoCollection coll = domain.listTemplates('%' + value + '%', form.chkDFT().getValue()); for(ReportTemplateLiteVo item : coll) { form.qmbReports().newRow(item, item.getName()); } if(coll.size() == 1) { form.qmbReports().setValue(coll.get(0)); } else if(coll.size() > 1) { form.qmbReports().showOpened(); } }
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 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 void populateReportsGrid(ReportTemplateLiteVoCollection templates) { if (templates == null || (templates != null && templates.size() == 0)) return; ReportListVoCollection coll = new ReportListVoCollection(); for (int i = 0; i < templates.size(); i++) { ReportTemplateLiteVo rep = templates.get(i); if (rep != null && rep.getReportIsNotNull()) { coll.add(domain.getReport(rep.getReport())); } } populateReports(coll); }
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 AppNavFormVo createFormForReport(ReportTemplateLiteVo rep, AppFormVo reportForm) { AppNavFormVo newForm = new AppNavFormVo(); newForm.setForm(reportForm); newForm.setLinkedClasses(null); GenericIdentifierVoCollection coll = new GenericIdentifierVoCollection(); GenericIdentifierVo genVo = new GenericIdentifierVo(); genVo.setInstanceId(rep.getBoId()); genVo.setClassName(rep.getClass().getName()); coll.add(genVo); newForm.setLinkedClasses(coll); newForm.setNodeText(rep.getName()); newForm.setAccessForEpisEnd(FormReadWrite.WRITE); newForm.setAccessForRip(FormReadWrite.WRITE); newForm.setIsReadOnly(false); return newForm; }
private boolean save(ReportNotePrintTemplateVo vo) { if (vo != null) { vo.setTemplate((ReportTemplateLiteVo)form.getGlobalContext().Core.getReportTemplateRef()); } String[] str = vo.validate(); if (str != null && str.length > 0) { engine.showErrors(str); return false; } try { vo = domain.save(vo); } catch (StaleObjectException e) { engine.showMessage(e.toString()); return false; } return true; }
@Override protected void onBtnOKClick() throws ims.framework.exceptions.PresentationLogicException { Object value = form.dyngrdReports().getValue(); if(value == null || !(value instanceof ReportTemplateLiteVo)) { engine.showMessage("Please select a template !"); return; } printReport((ReportTemplateLiteVo)value, PREVIEW_REPORT);//WDEV-19381 //WDEV-23016 //engine.close(DialogResult.OK); }
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); } } }
protected void onBtnPrintClick() throws PresentationLogicException { if(form.ccPrinters().getSelectedPrinter() == null) { engine.showMessage("Please select a printer !"); return; } Object value = form.dyngrdReports().getValue(); if(value == null || !(value instanceof ReportTemplateLiteVo)) { engine.showMessage("Please select a template !"); return; } if(printReport((ReportTemplateLiteVo)value,PRINT_REPORT)) { if (savePatientDocument()) engine.close(DialogResult.OK); } }
private void setTemplateGridRow(grdTemplatesRow row, ReportTemplateLiteVo template) { if (row == null) throw new CodingRuntimeException("Major Logical Error - Can not set a null row to a value"); if (template == null) throw new CodingRuntimeException("Logical Error - Value passed for row is null"); // Set the value of the row row.setValue(template); // Set the cell row.setcolTemplateName(template.getName()); row.setTooltipForcolTemplateName(template.getName()); }
private void setAssociations(ReportTemplateLiteVo template) { form.dyngrdAssociations().getRows().clear(); if (template == null) { form.lblTemplateName().setValue("Template: -"); return; } form.lblTemplateName().setValue("Template: " + template.getName()); try { // Get template associations from domain TemplateAssociationsVo templateAssociations = domain.getTemplateAssociation(template); // Populate associations populateAssociation(templateAssociations); // Set local context form.getLocalContext().setTemplateAssociation(templateAssociations); } catch (DomainInterfaceException exception) { engine.showMessage(exception.getMessage()); } }
public ReportTemplateLiteVo getReportTemplateLite(TemplateBoRefVo templateRef) { if (!templateRef.getID_TemplateBoIsNotNull()) throw new DomainRuntimeException("Unable to get Template with null id"); return ReportTemplateLiteVoAssembler.create((TemplateBo) getDomainFactory().getDomainObject(TemplateBo.class, templateRef.getBoId())); }
@Override protected void onBtnOKClick() throws ims.framework.exceptions.PresentationLogicException { Object value = form.dyngrdReports().getValue(); if(value == null || !(value instanceof ReportTemplateLiteVo)) { engine.showMessage("Please select a template !"); return; } form.getGlobalContext().Core.setReportTemplateRef((ReportTemplateLiteVo)value); form.getGlobalContext().Core.setTemplate(((ReportTemplateLiteVo)value).getName()); engine.close(DialogResult.OK); }
private void enablePreviewButtons() { boolean enable = form.dyngrdReports().getValue() instanceof ReportTemplateLiteVo; form.btnPreview().setEnabled(enable); form.getContextMenus().getGenericGridAddItem().setVisible(enable); form.btnCSVPreview().setEnabled(enable); }
private void getSelectedReport() { ReportBoRefVo prevReport = getReportRef(form.getLocalContext().getReportTemplateVo()); if (form.dyngrdReports().getValue() instanceof ReportTemplateLiteVo) { form.getLocalContext().setReportTemplateVo(domain.getTemplate(((ReportTemplateLiteVo) form.dyngrdReports().getValue()))); } ReportBoRefVo currentReport = getReportRef(form.getLocalContext().getReportTemplateVo()); if (prevReport != null && prevReport.equals(currentReport) == false) form.getGlobalContext().Admin.setReportSeedParsed(null); }
@Override protected void onBtnOKClick() throws ims.framework.exceptions.PresentationLogicException { Object value = form.dyngrdReports().getValue(); if(value == null || !(value instanceof ReportTemplateLiteVo)) { engine.showMessage("Please select a template !"); return; } printReport((ReportTemplateLiteVo)value); engine.close(DialogResult.OK); }
private void addTemplateRow() { if (form.getGlobalContext().Core.getReportTemplateRef() instanceof ReportTemplateLiteVo) { if (!templateAddedPreviously((ReportTemplateLiteVo) form.getGlobalContext().Core.getReportTemplateRef())) { grdTemplatesRow row = form.lyrDetails().tabTemplates().grdTemplates().getRows().newRow(); row.setColTemplate((ReportTemplateLiteVo) form.getGlobalContext().Core.getReportTemplateRef()); row.setValue(new ProfileTemplateVo()); } } }
private boolean templateAddedPreviously(ReportTemplateLiteVo selectedTemplate) { for (int i = 0; i < form.lyrDetails().tabTemplates().grdTemplates().getRows().size(); i++) { grdTemplatesRow row = form.lyrDetails().tabTemplates().grdTemplates().getRows().get(i); if (row.getColTemplate() != null && row.getColTemplate().equals(selectedTemplate)) return true; } return false; }