/** * Clear the current selection, if any. */ protected void clearSelection() { listBox.clearSelection(); }
/** * Clears all selections. */ private void clearSelection() { lstNotification.clearSelection(); updateControls(false); }
/** * Set the active patient when selected from the list. * * @param event The onSelect event. */ public void onSelect$lstPatientList(Event event) { lstSearch.clearSelection(); setActivePatient(event); }
public void onSelect$lstSearch(Event event) { lstPatientList.clearSelection(); setActivePatient(event); }
private void restoreGridState() { lbProblems.clearSelection(); for (Object object : lbProblems.getItems()) { Listitem item = (Listitem) object; lbProblems.renderItem(item); if (selectedProblems.contains(item.getValue())) { item.setSelected(true); } } selectedProblems.clear(); updateControls(); }
private void displaySearchMessage(String message) { lstSearch.clearSelection(); lstSearch.setModel((ListModelList<?>) null); lstSearch.getItems().clear(); if (message != null) { lstSearch.appendItem(message, null).setTooltiptext(message); } Clients.scrollIntoView(lstSearch.getFirstChild()); }
private void setSelectedRow(int index) { if (index < 0) { selectedRow = -1; selectedItem = ""; lstVitals.clearSelection(); chkPercentiles.setVisible(false); } else { selectedRow = index; selectedItem = getValue(0, index); lstVitals.setSelectedIndex(index); chkPercentiles.setVisible(percentiles.containsKey(getObject(0, index))); } chartData(); }
/** * Override to remove unnecessary Listitem re-indexing (when ROD is on, clear() is called frequently). */ public void clear() { final boolean oldFlag = setReplacingItem(true); try { //Bug ZK-1834: if there are selected items, clear first. if (getSelectedCount() > 0) { clearSelection(); // Bug ZK-1842 Listbox scroll bug listheader sort _anchorLeft = _anchorTop = 0; } super.clear(); } finally { setReplacingItem(oldFlag); } } };
/** * Handles a deferred request to show the dialog. * * @param event The onShow event. * @throws Exception Unspecified exception. */ public void onShow(Event event) throws Exception { root.removeAttribute(Constants.SELECTED_PATIENT_ATTRIB); lstSearch.clearSelection(); onCheck$rgrpLists(); Events.echoEvent(Events.ON_FOCUS, root, null); if (!root.inModal()) { root.doModal(); } }
public void onClick$lstAllergies() { Listitem item = lstAllergies.getSelectedItem(); if (item != null) { lstAllergies.clearSelection(); String s = item.getValue(); List<String> lst = broker.callRPCList("RGCWARCV DETAIL", null, patientId, StrUtil.piece(s, U)); ReportBox.modal(lst, code2Text('A'), allowPrint); } }
/** * Deselects the given item without deselecting other items. * * <p>Notice that if you assign a model to a listbox ({@link #setModel}), * you shall not invoke this method directly. Rather, use {@link Selectable} * instead. */ public void removeItemFromSelection(Listitem item) { if (item.getParent() != this) throw new UiException("Not a child: " + item); if (item.isSelected()) { if (!_multiple) { clearSelection(); } else { item.setSelectedDirectly(false); _selItems.remove(item); fixSelectedIndex(0); // ZK-2113: should be same as normal mold // if (inSelectMold()) { // item.smartUpdate("selected", false); // } else { // } smartUpdateSelection(); } } }
final int expSelCnt = selObjs.size(); if (expSelCnt == 0) { clearSelection(); return;
/** * 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$lstNotes() { Listitem item = lstNotes.getSelectedItem(); if (item != null) { lstNotes.clearSelection(); String s = item.getValue(); char c = StrUtil.piece(s, StrUtil.U, 2).charAt(0); List<String> lst = null; String patientId = PatientContext.getActivePatient().getId().getIdPart(); switch (c) { case 'A': lst = broker.callRPCList("RGCWCACV DETAIL", null, patientId); break; case 'F': lst = broker.callRPCList("RGCWCACV PRF", null, patientId, StrUtil.piece(s, StrUtil.U)); break; default: lst = broker.callRPCList("TIU GET RECORD TEXT", null, StrUtil.piece(s, StrUtil.U)); break; } if (lst != null && !lst.isEmpty()) { ReportBox.modal(lst, code2Text(c), allowPrint); } } }
jsel = -1; if (jsel < 0) { // unselect all clearSelection(); } else if (jsel != _jsel || (_multiple && _selItems.size() > 1) || !_selItems.contains(getItemAtIndex(_jsel))) { for (Listitem item : _selItems) {
clearSelection(); if (_model != null) ((Selectable) _model).clearSelection();