private void initialize() { if(form.getGlobalContext().Admin.getDrawingConfigListFilterIsNotNull()) { GraphicAssessmentFilterVo voGraphicAssessmentFilter = form.getGlobalContext().Admin.getDrawingConfigListFilter(); if(voGraphicAssessmentFilter != null) { form.txtImageNameSearch().setValue(voGraphicAssessmentFilter.getName()); form.cmbStatus().setValue(voGraphicAssessmentFilter.getStatus()); form.GroupSearchCriteria().setValue(getGroupCriteria(voGraphicAssessmentFilter)); search(); } } else { DrawingGraphicImageShortVo voDrawingGraphicImageShort = form.getGlobalContext().Admin.getDrawingGraphicImageShortVo(); if(voDrawingGraphicImageShort != null && voDrawingGraphicImageShort.getID_DrawingGraphicImageIsNotNull()) { clearSearchGrid(); DrawingGraphicImageShortVoCollection voColl = new DrawingGraphicImageShortVoCollection(); voColl.add(voDrawingGraphicImageShort); displayListImages(voColl); } setDefaultData(); } }
private void displayListImages(DrawingGraphicImageShortVoCollection voColl) { for (int i = 0; i < voColl.size(); i++) { DrawingGraphicImageShortVo voDGImage = voColl.get(i); GenForm.grdImagesSearchRow row = form.grdImagesSearch().getRows().newRow(); row.setcolImageName(voDGImage.getImageName()); row.setcolDescription(voDGImage.getImageDescription()); row.setcolStatus(voDGImage.getImageStatusIsNotNull() ? voDGImage.getImageStatus().toString() : ""); row.setcolVersionNo(voDGImage.getVersionNumberIsNotNull() ? voDGImage.getVersionNumber().toString() : ""); row.setValue(voDGImage); } }
private void enableContextMenu() { DrawingGraphicImageShortVo voDrawingGraphic = form.grdImagesSearch().getValue(); boolean isRecordSelected = voDrawingGraphic != null; form.getContextMenus().getDrawingConfigListAddDrawingConfigurationItem().setVisible(true); form.getContextMenus().getDrawingConfigListEditDrawingConfigurationItem().setVisible(isRecordSelected); form.getContextMenus().getDrawingConfigListViewItem().setVisible(isRecordSelected); form.getContextMenus().getDrawingConfigListAddDrawingConfigurationBasedOnItem().setText(getConfigurationText(voDrawingGraphic)); form.getContextMenus().getDrawingConfigListAddDrawingConfigurationBasedOnItem().setVisible(isRecordSelected); }
private String getConfigurationText(DrawingGraphicImageShortVo voDrawingGraphic) { String text = "Add Drawing Configuration"; if (voDrawingGraphic != null && voDrawingGraphic.getImageNameIsNotNull()) { text += " based on '"; text += voDrawingGraphic.getImageName(); text += "'"; } return text; }
private DrawingGraphicImageVo getDrawingGraphicImageVo() { DrawingGraphicImageShortVo voDrawingGraphicImageShort = form.getGlobalContext().Admin.getDrawingGraphicImageShortVo(); if (voDrawingGraphicImageShort != null && voDrawingGraphicImageShort.getID_DrawingGraphicImageIsNotNull()) { return domain.getDrawingGraphicImage(voDrawingGraphicImageShort); } DrawingGraphicImageVo voDrawingGraphicImage = new DrawingGraphicImageVo(); voDrawingGraphicImage.setImageStatus(PreActiveActiveInactiveStatus.PREACTIVE); return voDrawingGraphicImage; }