private boolean save() { FloorLayoutVo value = populateDataFromScreen(form.getLocalContext().getCurrentRecord()); String[] errors = value.validate(); if(errors != null && errors.length > 0) { engine.showErrors(errors); return false; } try { value = domain.save(value); } catch (StaleObjectException e) { engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); open(); return false; } form.getLocalContext().setCurrentRecord(value); form.getGlobalContext().Core.FloorLayout.setSelection(value); return true; }
private void loadNewSelectedLayout() { form.bedPlanner().setPlan(""); FloorLayoutLiteVo id = form.cmbFloorLayout().getValue(); if (id != null) { FloorLayoutVo layout = domain.getLayout(form.cmbFloorLayout().getValue()); form.bedPlanner().setPlan(layout.getVml()); form.getLocalContext().setCurentLayout(layout); } }
private void populateScreenFromData(FloorLayoutVo value) { form.getLocalContext().setCurrentRecord(value); form.layoutDesigner().clearAreas(); form.layoutDesigner().setPlan(""); if(value != null) { form.txtName().setValue(value.getName()); form.cmbStatus().setValue(value.getStatus()); form.layoutDesigner().setPlan(value.getVml()); } }
public FloorLayoutVo getLayout(FloorLayoutRefVo id) { BayFloorPlanDesigner impl = (BayFloorPlanDesigner)getDomainImpl(BayFloorPlanDesignerImpl.class); return impl.get(id); }