private void populateScreenFromData(ConfiguredJobNotificationVo vo) { clearAll(); if (vo != null && vo.getUserIsNotNull()) { form.qmbUser().newRow(vo.getUser(), vo.getUser().getUsername()); form.qmbUser().setValue(vo.getUser()); } form.cmbPriority().setValue(vo != null ? (vo.getPriorityIsNotNull() ? vo.getPriority() : NotificationPriority.NORMAL) : NotificationPriority.NORMAL); form.txtMessage().setValue(vo != null ? (vo.getUserMessageIsNotNull() ? vo.getUserMessage() : null) : null); popuateDeliveryMechanism(vo != null ? (vo.getDeliveryIsNotNull() ? vo.getDelivery() : null) : null); }
@Override protected void onBtnSaveClick() throws PresentationLogicException { String[] uiErrors = getUiErrors(); if(uiErrors != null && uiErrors.length > 0) { engine.showErrors(uiErrors); return; } ConfiguredJobNotificationVo vo = populateDataFromScreen(form.getLocalContext().getEditedRecord()); form.getGlobalContext().Admin.setSystemJobNotification(vo); engine.close(DialogResult.OK); }