/** Returns the value. * The same as {@link #getText}. * <p>Default: "". * @exception WrongValueException if user entered a wrong value */ public String getValue() throws WrongValueException { return getText(); }
public void onClick$btnProvider() { ProviderUtil.search(edtProvider.getText(), 40, modelProviders); }
/** * Update the original recipient list, set the response attribute, and close the dialog */ public void onClick$btnOK() { recipients.clear(); recipients.addAll(modelRecipients); root.setAttribute("ok", txtComment.isVisible() ? txtComment.getText() : true); root.detach(); } }
public void onClick$btnSearch() { String text = txtSearch.getText().trim(); if (text.isEmpty() && !lookupParams.isLookupNull()) { PromptDialog.showWarning(BgoConstants.TX_NO_SEARCH_TEXT, BgoConstants.TC_NO_SEARCH); return; } doSearch(text); if (!lbResults.isVisible()) { PromptDialog.showInfo(BgoConstants.TX_NO_MATCHES, "Find Record"); } }
public void onClick$btnParticipant() { String search = edtParticipant.getText().trim(); if (!search.isEmpty()) { try { PractitionerSearchCriteria criteria = new PractitionerSearchCriteria(search); allParticipantsModel.clear(); allParticipantsModel.addAll(practitionerSearch.search(criteria)); } catch (Exception e) { PromptDialog.showError(e); } } }
/** * Validate entries. * * @return True if all entries successfully validated. False otherwise. */ private boolean validate() { if (StringUtils.trimToEmpty(txtSubject.getText()).isEmpty()) { wrongValue(txtSubject, "vistanotification.schedule.validate.nosubject"); } else if (dtbDelivery.getDate() == null) { wrongValue(dtbDelivery, "vistanotification.schedule.validate.nodate"); } else if (recipients.isEmpty()) { wrongValue(txtRecipients, "vistanotification.schedule.validate.norecipients"); } else { return true; } return false; }
public void onClick$btnICD() { String result = ICDLookupController.execute(txtICD.getText()); if (result != null) { String pcs[] = StrUtil.split(result, StrUtil.U, 3); icd = new CodingProxy(pcs[0], "ICD9", pcs[1], pcs[2]); txtICD.setValue(pcs[2]); } }
public void onClick$btnOK() { clearMessages(); Radio radio = rgReason.getSelectedItem(); String reasonCode = radio == null ? null : (String) radio.getValue(); if (reasonCode == null) { Clients.wrongValue(rgReason, "You must select a reason for the deletion."); return; } String reasonText = "3".equals(reasonCode) ? txtOther.getText().trim() : null; if (reasonText != null && reasonText.isEmpty()) { Clients.wrongValue(txtOther, "Please enter text describing the reason for the deletion."); return; } try { service.delete(record, reasonCode, reasonText); } catch (Exception e) { PromptDialog.showError(e.getMessage()); return; } root.setAttribute("ok", true); root.detach(); } }
private void syncInputs() { boolean ignore = radNo.isChecked(); record.setIndicated(radYes.isChecked()); record.setGoalRange(ignore ? null : cboGoal.getText()); record.setGoalMin(ignore ? null : NumberUtils.toDouble(cboMin.getText())); record.setGoalMax(ignore ? null : NumberUtils.toDouble(cboMax.getText())); record.setDuration(ignore ? null : cboDuration.getText()); record.setStartDate(ignore ? null : datStart.getValue()); record.setComment(txtComment.getText()); record.setProvider((Practitioner) wbProvider.getSelectedData()); }
/** * Process a single notification. * * @param notification Notification to display. * @param message Optional message text to display. If null, the message text associated with * the notification is displayed. */ public void process(Notification notification, String message) { if (notification != null) { this.notification = notification; lblHeader.setValue(notification.getSubject()); txtMessage.setText(message != null ? message : StrUtil.fromList(service.getNotificationMessage(notification))); txtMessage.setVisible(!txtMessage.getText().isEmpty()); btnDelete.setDisabled(!notification.canDelete()); btnDeleteAll.setDisabled(notification.isActionable() || btnDelete.isDisabled()); btnSkipAll.setDisabled(notification.isActionable()); btnView.setDisabled(!notification.hasPatient()); caption.setLabel(notification.hasPatient() ? notification.getPatientName() : defaultTitle); txtMessage.invalidate(); root.setVisible(true); } else { onAction(null); } }
/** * Update the scheduled notification with new input values and send to the server, then close * the dialog if successful. */ public void onClick$btnOK() { if (validate()) { notification.setDeliveryDate(new FMDate(dtbDelivery.getDate())); notification.setDfn(chkAssociate.isChecked() ? (String) chkAssociate.getValue() : null); notification.setPatientName(chkAssociate.isChecked() ? lblPatient.getValue() : null); notification.setSubject(txtSubject.getValue()); notification.setPriority((Priority) cboPriority.getSelectedItem().getValue()); List<String> message = StrUtil.toList(txtMessage.getText()); if (service.scheduleNotification(notification, message, recipients)) { root.setAttribute("notification", notification); root.detach(); } else { PromptDialog.showError("@vistanotification.schedule.save.failure"); } } }