private void initialize() { if (form.getGlobalContext().Core.BedFloorLayout.getReadOnly() != null && form.getGlobalContext().Core.BedFloorLayout.getReadOnly().booleanValue()) { form.setMode(FormMode.VIEW); } else { form.setMode(FormMode.EDIT); form.txtName().setFocus(); if (form.getGlobalContext().Core.BedFloorLayout.getSelection() == null || (form.getGlobalContext().Core.getBedLayoutActionIsNotNull() && form.getGlobalContext().Core.getBedLayoutAction().equals(BedLayoutAction.CLONE))) { form.cmbStatus().setValue(PreActiveActiveInactiveStatus.PREACTIVE); form.chkIsTemplate().setValue(false); } } loadFloorLayouts(); form.bedPlanner().addBedImage(Bed.WHITE.getType()); }
private void open() { if (form.getGlobalContext().Core.BedFloorLayout.getSelection() != null) { FloorBedSpaceLayoutVo value = domain.get(form.getGlobalContext().Core.BedFloorLayout.getSelection()); if (form.getGlobalContext().Core.getBedLayoutActionIsNotNull() && form.getGlobalContext().Core.getBedLayoutAction().equals(BedLayoutAction.CLONE)) { FloorBedSpaceLayoutVo record = new FloorBedSpaceLayoutVo(); record.setBedSpaces(value.getBedSpaces()); record.setFloorLayout(value.getFloorLayout()); record.setName(null); record.setStatus(PreActiveActiveInactiveStatus.PREACTIVE); record.setIsTemplate(true); populateScreenFromData(record); } else { populateScreenFromData(value); form.chkIsTemplate().setEnabled(false); } } else form.chkIsTemplate().setValue(true); }
private void initialize() { if (form.getGlobalContext().Core.BedFloorLayout.getReadOnly() != null && form.getGlobalContext().Core.BedFloorLayout.getReadOnly().booleanValue()) { form.setMode(FormMode.VIEW); } else { form.setMode(FormMode.EDIT); form.txtName().setFocus(); if (form.getGlobalContext().Core.BedFloorLayout.getSelection() == null || (form.getGlobalContext().Core.getBedLayoutActionIsNotNull() && form.getGlobalContext().Core.getBedLayoutAction().equals(BedLayoutAction.CLONE))) { form.cmbStatus().setValue(PreActiveActiveInactiveStatus.PREACTIVE); form.chkIsTemplate().setValue(false); } } loadFloorLayouts(); form.bedPlanner().addBedImage(Bed.WHITE_BED.getType()); form.bedPlanner().addBedImage(Bed.WHITE_CHAIR.getType()); }
private void open() { if (form.getGlobalContext().Core.BedFloorLayout.getSelection() != null) { FloorBedSpaceLayoutVo value = domain.get(form.getGlobalContext().Core.BedFloorLayout.getSelection()); if (form.getGlobalContext().Core.getBedLayoutActionIsNotNull() && form.getGlobalContext().Core.getBedLayoutAction().equals(BedLayoutAction.CLONE)) { FloorBedSpaceLayoutVo record = new FloorBedSpaceLayoutVo(); record.setBedSpaces(value.getBedSpaces()); record.setFloorLayout(value.getFloorLayout()); record.setName(null); record.setStatus(PreActiveActiveInactiveStatus.PREACTIVE); record.setIsTemplate(true); populateScreenFromData(record); } else { populateScreenFromData(value); if (FormMode.EDIT.equals(form.getMode())) form.chkIsTemplate().setEnabled(false); } } else form.chkIsTemplate().setValue(true); }
private void cloneInstance() { form.getGlobalContext().Core.BedFloorLayout.setReadOnly(false); form.getGlobalContext().Core.BedFloorLayout.setSelection(form.grdDetails().getValue()); form.getGlobalContext().Core.setBedLayoutAction(BedLayoutAction.CLONE); engine.open(form.getForms().Core.BayBedSpaceLayoutDesigner); }
private void viewOrUpdateInstance(boolean readOnly) { form.getGlobalContext().Core.BedFloorLayout.setReadOnly(readOnly); form.getGlobalContext().Core.BedFloorLayout.setSelection(form.grdDetails().getValue()); if (readOnly) form.getGlobalContext().Core.setBedLayoutAction(BedLayoutAction.VIEW); else form.getGlobalContext().Core.setBedLayoutAction(BedLayoutAction.EDIT); engine.open(form.getForms().Core.BayBedSpaceLayoutDesigner); }
@Override protected void onBtnEditClick() throws ims.framework.exceptions.PresentationLogicException { form.getGlobalContext().Core.setBedLayoutAction(BedLayoutAction.EDIT); open(); form.setMode(FormMode.EDIT); }
@Override protected void onBtnCancelClick() throws ims.framework.exceptions.PresentationLogicException { if (form.getLocalContext().getCurrentRecord() == null || (form.getGlobalContext().Core.getBedLayoutActionIsNotNull() && form.getGlobalContext().Core.getBedLayoutAction().equals(BedLayoutAction.CLONE))) { returnToList(); } else { open(); form.setMode(FormMode.VIEW); } }