private void addLocationSite(LocSiteShortVo location) { if(location == null) return; if(location.getID_LocationIsNotNull() && location.getID_Location().intValue() == 0) return; GenForm.lyrDetailsLayer.tabLocationsContainer.grdLocationsRow row = form.lyrDetails().tabLocations().grdLocations().getRows().newRow(); TemplateLocationShortVo templateLocation = new TemplateLocationShortVo(); templateLocation.setLocation(location); templateLocation.setIsActive(Boolean.TRUE); row.setcolImage(form.getImages().Admin.LocationSite); row.setcolName(location.getName()); row.setValue(templateLocation); }
private boolean locationExists(TemplateLocationShortVoCollection templateLocations, LocSiteShortVo location) { if(templateLocations == null || location == null) return false; for(int x = 0; x < templateLocations.size(); x++) { TemplateLocationShortVo item = templateLocations.get(x); if(item != null && item.getLocationIsNotNull() && item.getLocation().equals(location)) return true; } return false; }
private void populateScreenFromData(ims.ocrr.vo.OrderEntryTemplateVo value) { clearScreen(); if(value == null) return; this.form.cmbCategory().setValue(value.getTemplateCategoryIsNotNull() ? value.getTemplateCategory() : null); this.form.txtDescription().setValue(value.getDescriptionIsNotNull() ? value.getDescription(): null); this.form.txtMenuName().setValue(value.getMenuNameIsNotNull() ? value.getMenuName(): null); this.form.txtFormName().setValue(value.getFormNameIsNotNull() ? value.getFormName(): null); this.form.cmbStatus().setValue(value.getActiveStatusIsNotNull() ? value.getActiveStatus() : null); this.form.lyrDetails().tabText().richFormText().setValue(value.getFormTextIsNotNull()? value.getFormText() : null); // ----- Start of grdComponents Grid -------------------------- ims.ocrr.vo.OrderEntryTemplateComponentShortVoCollection fieldgrdComponents = value.getComponentsIsNotNull() ? value.getComponents() : null; if(fieldgrdComponents != null) { fieldgrdComponents.sort(); for(int x = 0; x < fieldgrdComponents.size(); x++) { if(fieldgrdComponents.get(x) != null) { this.addComponent(fieldgrdComponents.get(x), false); } } } // ----- End of grdComponents Grid ---------------------------- // ----- Start of grdColumnNames Grid -------------------------- ims.ocrr.vo.OrderEntryTemplateColumnVoCollection fieldgrdColumnNames = value.getColumnsIsNotNull() ? value.getColumns() : null; if(fieldgrdColumnNames != null) { fieldgrdColumnNames.sort(); GenForm.lyrDetailsLayer.tabComponentsContainer.grdColumnNamesRow rowgrdColumnNames; for(int x = 0; x < fieldgrdColumnNames.size(); x++) { if(fieldgrdColumnNames.get(x) != null) { rowgrdColumnNames = this.form.lyrDetails().tabComponents().grdColumnNames().getRows().newRow(); rowgrdColumnNames.setcolImage(form.getImages().OCRR.ColumnSeparator); rowgrdColumnNames.setcolName(fieldgrdColumnNames.get(x).getColName()); } } } // ----- End of grdColumnNames Grid ---------------------------- // Start Locations -------------- loadLocations(); if(value.getTemplatesLocationsIsNotNull()) { for(int x = 0; x < value.getTemplatesLocations().size(); x++) { TemplateLocationShortVo tlItem = value.getTemplatesLocations().get(x); if(tlItem != null && tlItem.getIsActiveIsNotNull() && tlItem.getIsActive().booleanValue()) selectLocation(value.getTemplatesLocations().get(x).getLocation()); } } // End Locations ---------------- // Start Roles ------------------- loadRoles(); if(value.getTemplateRolesIsNotNull()) { for(int i = 0; i < value.getTemplateRoles().size(); i++) { TemplateRoleShortVo voTemplateShort = value.getTemplateRoles().get(i); if(voTemplateShort != null && voTemplateShort.getIsActiveIsNotNull() && voTemplateShort.getIsActive().booleanValue()) { selectRole(voTemplateShort.getAppRole()); } } } // End Roles --------------------- }