private void addHelpText() { grdTestHelpRow row = form.lyrInvestigations().tabHelpTexts().grdTestHelp().getRows().newRow(true); HelpTextVo item = new HelpTextVo(); item.setID_HelpText(new Integer(0 - HelpTextVo.generateValueObjectUniqueID())); boolean addInstructToCollectItem = true; if (form.cmbCategory().getValue() != null && form.cmbCategory().getValue().equals(Category.CLINICALIMAGING) || (form.getLocalContext().getisProfileIsNotNull() && form.getLocalContext().getisProfile().equals(Boolean.TRUE) && !form.cmbCategory().getValue().equals(Category.PATHOLOGY))) addInstructToCollectItem = false; bindHelpTextCol(row, addInstructToCollectItem); row.setValue(item); updateControlsState(form.getLocalContext().getCurrentScreenMode()); }
private void populateScreenFromData(ims.ocrr.vo.OrderSetEditVo value) { clearScreen(); if(value == null) return; this.form.txtCommonName().setValue(value.getCommonNameIsNotNull() ? value.getCommonName(): null); // ----- Start of grdComponents Grid -------------------------- ims.ocrr.vo.OrderSetComponentEditVoCollection fieldgrdComponents = value.getComponentIsNotNull() ? value.getComponent() : null; if(fieldgrdComponents != null) { fieldgrdComponents.sort(); for(int x = 0; x < fieldgrdComponents.size(); x++) { if(fieldgrdComponents.get(x) != null) { addComponent(fieldgrdComponents.get(x), false); } } } // ----- End of grdComponents Grid ---------------------------- this.form.txtName().setValue(value.getNameIsNotNull() ? value.getName(): null); this.form.cmbStatus().setValue(value.getActiveStatusIsNotNull() ? value.getActiveStatus() : null); this.form.txtDescription().setValue(value.getDescriptionIsNotNull() ? value.getDescription(): null); this.form.cmbColor().setValue(value.getColorIsNotNull() ? value.getColor() : null); //WDEV-11938 - starts here HelpTextVoCollection helpTextCol = value.getHelpText(); if(helpTextCol != null) { for(int i=0; i<helpTextCol.size(); i++) { HelpTextVo rowValue = helpTextCol.get(i); if(rowValue == null) continue; grdHelpTextRow newRow = form.grdHelpText().getRows().newRow(); newRow.setValue(rowValue); newRow.setcolTitle(rowValue.getTextCategory()); newRow.setcolText(rowValue.getHelpText()); } } //WDEV-11938 - ends here }