protected void onBtnSaveClick() throws PresentationLogicException { GaitReEducationVo voGait = form.getLocalContext().getGaitEducation(); if (voGait == null) voGait = new GaitReEducationVo(); voGait.setAuthoringCP(form.qmbAuthoringCP().getValue()); voGait.setAuthoringDateTime(form.dtimAuthoring().getValue()); if (form.getGlobalContext().Core.getCurrentClinicalContactIsNotNull()) voGait.setClinicalContact(form.getGlobalContext().Core.getCurrentClinicalContact()); voGait.setDetails(form.txtDetails().getValue()); voGait.setGaitAspect(populateDataFromGrdAspect()); String[] uiErrors = getUiErrors(); String[] message = voGait.validate(uiErrors); if (message != null) { engine.showErrors("Validation errors", message); return; } try { domain.saveGaitReEducation(voGait); } catch (StaleObjectException e) { engine.showMessage(ims.configuration.gen.ConfigFlag.UI.STALE_OBJECT_MESSAGE.getValue()); open(); return; } catch (UniqueKeyViolationException e) { engine.showMessage("A Gait Re-Education record already exists. " + e.getMessage()); open(); return; } open(); }