protected void onCmbMoveTypeValueChanged() throws PresentationLogicException { if (form.ctnDetails().cmbMoveType().getValue() != null) { if (form.ctnDetails().cmbMoveType().getValue().equals(MovementType.ADMISSION) || form.ctnDetails().cmbMoveType().getValue().equals(MovementType.DISCHARGE)) { showOnlyWard(); } if (form.ctnDetails().cmbMoveType().getValue().equals(MovementType.TRANSFER)) { showWardDest(); } } else { engine.showMessage("Select Admission, Transfer or Discharge"); form.ctnDetails().cmbMoveType().setValue(MovementType.TRANSFER); showWardDest(); } }
private boolean isMoveTypeConfigured(MovementType type) { for(int x = 0; x < form.grdList().getRows().size(); x++) { PropertyChecklistShortVo value = form.grdList().getRows().get(x).getValue(); if(value != null && value.getMovementType() != null && value.getMovementType().equals(type) && !value.getMovementType().equals(MovementType.TRANSFER)) { return true; } } return false; }
private void updateEntry() { form.setMode(FormMode.EDIT); form.ctnDetails().customAuthoringHCP().setEnabledAuthoringHCP(Boolean.FALSE); form.ctnDetails().customAuthoringHCP().setEnabledDateTime(Boolean.FALSE); form.ctnDetails().cmbMoveType().setEnabled(false); if (form.grdList().getSelectedRowIndex() >=0) if (!(form.ctnDetails().cmbMoveType().getValue().equals(MovementType.ADMISSION) || form.ctnDetails().cmbMoveType().getValue().equals(MovementType.DISCHARGE))) { showWardDest(); } int size = form.ctnDetails().grdItems().getRows().size(); if(size > 0) { form.ctnDetails().grdItems().setValue(form.ctnDetails().grdItems().getRows().get(size-1).getValue()); } updateControlState(); }
private void updateRowRecord(PropertyChecklistVo record) { if (record == null) return; for (int j = 0; j < form.grdList().getRows().size(); j++) { PropertyChecklistShortVo existingRecord = form.grdList().getRows().get(j).getValue(); if (existingRecord != null && existingRecord.equals(record)) { updateRowRecord(form.grdList().getRows().get(j), record); break; } } if (form.ctnDetails().cmbMoveType().getValue().equals(MovementType.TRANSFER)) { showWardDest(); } else { showOnlyWard(); } }
private boolean ifMovTypeIsTransfer() { if (form.ctnDetails().cmbMoveType().getValue() != null) { if (form.ctnDetails().cmbMoveType().getValue().equals(MovementType.TRANSFER)) { //form.ctnDetails().qmbDestWard().setRequired(true); return true; } } return false; }