public String getValue(Component cmp) { return ((Textbox) cmp).getValue(); } });
public class UploadFile extends GenericForwardComposer<Window> { private static final long serialVersionUID = 1L; private Textbox value; private Button but; public void onChanging$value() { if ( value.getValue().length() > 0 ) but.setDisabled( false ); else but.setDisabled( true ); } public void onClick$but() { alert(value.getValue()); } }
public void onClick$btnReadBy() { LookupController.execute(Table.rtProvider, txtReadBy.getValue()); }
public void onClick$btnLocation() { LookupController.execute(Table.rtLocation, txtLocation.getValue()); }
public void onClick$btnSkinTest() { LookupController.execute(Table.rtSkinTest, txtSkinTest.getValue()); }
public void onClick$btnAdminBy() { LookupController.execute(Table.rtProvider, txtAdminBy.getValue()); }
/** * Lookup a location and populate listbox with results. * * @throws Exception Unspecified exception. */ public void onClick$btnLocation() throws Exception { locationLookup(txtLocation.getValue(), lstLocation, LocationContext.getActiveLocation()); }
/** * Lookup a location and populate listbox with results. * * @throws Exception Unspecified exception. */ public void onClick$btnLocation() throws Exception { locationLookup(txtLocation.getValue(), lstLocation, LocationContext.getActiveLocation()); }
public void onClick$btnLocation() throws Exception { LocationSelection.locationLookup(txtLocation.getValue(), lstLocation, LocationContext.getActiveLocation()); }
public void onClick$btnLocation() throws Exception { LocationSelection.locationLookup(txtLocation.getValue(), lstLocation, LocationContext.getActiveLocation()); }
public void onClick$btnOK() { if (pnlReason.isVisible() && StringUtils.isEmpty(txtReason.getValue())) { setError("You must provide a reason for overriding these warnings."); txtReason.setFocus(true); return; } items.clear(); items.addAll(getItems(false)); close(false); }
public void onClick$btnOK() { String text = VistAUtil.trimNarrative(txtNote.getValue()); if (text.length() < 3) { PromptDialog.showError("Note must be at least 3 characters in length.", "Note too Short"); txtNote.setValue(text); return; } result = text; close(false); }
private String getValue(int col, int row) { Component cmp = getCell(col, row).getFirstChild(); return cmp instanceof Label ? ((Label) cmp).getValue() : ((Textbox) cmp).getValue(); }
private boolean validateAll() { if (!NumberUtils.isDigits(txtID.getValue())) { PromptDialog.showError(BgoConstants.TX_NO_NUMERIC, "Not Numeric"); txtID.setFocus(true); return false; } String txt = VistAUtil.trimNarrative(txtNarrative.getValue()); if (txt.isEmpty()) { PromptDialog.showError(BgoConstants.TX_NO_NARR, BgoConstants.TC_NO_NARR); return false; } if (txt.length() > 80) { if (PromptDialog.confirm(BgoConstants.TX_NARR_TOO_LONG, BgoConstants.TC_NARR_TOO_LONG)) { txt = txt.substring(0, 80); } else { return false; } } txtNarrative.setValue(txt); return true; }
/** * Submits the authentication request. */ private void doSubmit() { showMessage(""); final Organization organization = getSelectedOrganization(); String instId = organization == null ? null : organization.getId().getIdPart(); String username = j_username.getValue().trim(); final String password = j_password.getValue(); if (username.contains("\\")) { String[] pcs = username.split("\\\\", 2); instId = pcs[0]; username = pcs[1]; } if (!username.isEmpty() && !password.isEmpty() && !instId.isEmpty()) { session.setAttribute(Constants.DEFAULT_INSTITUTION, instId); FrameworkWebSupport.setCookie(Constants.DEFAULT_INSTITUTION, instId); session.setAttribute(Constants.DEFAULT_USERNAME, username); //FrameworkWebSupport.setCookie(Constants.DEFAULT_USERNAME, username); j_username.setValue(instId + "\\" + username); showState(Labels.getLabel(Constants.LBL_LOGIN_PROGRESS)); session.setAttribute(org.carewebframework.security.spring.Constants.SAVED_REQUEST, savedRequest); Events.sendEvent("onSubmit", loginRoot.getRoot(), null); } else { showMessage(Labels.getLabel(Constants.LBL_LOGIN_REQUIRED_FIELDS)); } }
/** * Search for matching patients based on user input. */ private void doSearch() { log.trace("Start doSearch()"); Clients.clearBusy(); displaySearchMessage(null); try { lstSearch.clearSelection(); List<Patient> matches = PatientSearchUtil.execute(edtSearch.getValue(), 100); if (matches != null) { lstSearch.setModel(new ListModelList<Patient>(matches)); if (matches.size() == 1) { lstSearch.setSelectedIndex(0); } } } catch (Exception e) { displaySearchMessage(e.getMessage()); } edtSearch.setFocus(true); edtSearch.select(); Events.postEvent(Events.ON_SELECT, lstSearch, null); }
public void onClick$btnSearch() { String text = txtSearch.getValue().trim(); boolean synonym = rgrpLookupMode.getSelectedIndex() == 1; FMDate date = new FMDate(datSearch.getValue()); Long max = (Long) rgrpMaxResults.getSelectedItem().getValue(); String[] filters = getSelectedSubsets(); List<TermMatch> matches = TermUtil.lookupSCT(text, synonym, date, max, filters); TreeNode<Object> rootNode = new DefaultTreeNode<>(null, null, false); buildModel(rootNode, matches); DefaultTreeModel<Object> model = new DefaultTreeModel<>(rootNode); treeSearch.setModel(model); }
public void open(boolean open) { String desktopId = target.getDesktop().getId(); String cmd = Events.ON_OPEN; String value = target.as(Textbox.class).getValue(); OpenEvent event = new OpenEvent(cmd, (Component)target.getDelegatee(), open, null, value); Map<String, Object> data = EventDataManager.getInstance().build(event); ((ClientCtrl) target.getClient()).postUpdate(desktopId,target.getUuid(), cmd, data, false); ((ClientCtrl) getClient()).flush(desktopId); } }
/** * Loads form data from the current problem. */ private void loadForm() { if (test != null) { setEventType(test.getEventType()); radRefusal.setDisabled(!radRefusal.isChecked()); radHistorical.setDisabled(!radHistorical.isChecked()); radCurrent.setDisabled(!radCurrent.isChecked()); datEvent.setValue(test.getDate()); ZKUtil.disableChildren(fraHistorical, true); datEvent.setDisabled(true); int reading = NumberUtils.toInt(test.getReading(), -1); spnReading.setValue(reading < 0 ? null : reading); } else { onClick$btnSkinTest(); if (txtSkinTest.getValue().isEmpty()) { close(true); return; } setEventType(EventType.CURRENT); Encounter visit = EncounterContext.getActiveEncounter(); Date date = visit == null ? null : visit.getPeriod().getStart(); datEvent.setValue(DateUtil.stripTime(date == null ? new Date() : date)); } }
/** * 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"); } } }