private boolean save() { String[] errors = validateUIRules(); if (errors != null && errors.length > 0) { engine.showErrors(errors); return false; } EDAssessmentWoundImagesVo record = populateDataFromScreen(form.getLocalContext().getEDAssessmentWoundImages()); errors = record.validate(); if (errors != null && errors.length > 0) { engine.showErrors(errors); return false; } try { domain.saveRecord(record); } catch (StaleObjectException e) { engine.showMessage(ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); } return true; }
private void open() { clear(); EDAssessmentWoundImagesVo tempVo = domain.getEDAssessmentWoundImageByPatient(form.getLocalContext().getPatientRef()); form.getLocalContext().setEDAssessmentWoundImages(tempVo); if( tempVo != null && tempVo.getWoundImagesIsNotNull() && tempVo.getWoundImages().size() > 0) { populateRecordBrowser(); recbrwoundImagesValueChanged(); } form.setMode(FormMode.VIEW); }