private boolean findProvider(Object provider) { if (provider != null) { int i = ListUtil.findListboxData(lstEncounterProviders, provider); if (i >= 0) { lstEncounterProviders.setSelectedIndex(i); return true; } } return false; }
/** * Returns a list of listbox items. * * @param selectedOnly If true, only selected items are returned. * @return List of list items. */ protected List<Listitem> getItems(boolean selectedOnly) { return selectedOnly ? ListUtil.getSelectedItems(listBox) : listBox.getItems(); }
private void selectItem(Combobox cbo, String label) { if (label != null) { ListUtil.selectComboboxItem(cbo, label); } }
int idx = ListUtil.findComboboxData(dateTypePicker, sortModePref); dateTypePicker.setSelectedIndex(idx == -1 ? 0 : idx); dateTypePicker.setReadonly(true);
dtbDelivery.setDate(notification.getDeliveryDate()); dtbDelivery.setConstraint("no past"); ListUtil.selectComboboxData(cboPriority, notification.getPriority());
private boolean findParticipant(Object participant) { if (participant != null) { int i = ListUtil.findListboxData(lstEncounterParticipants, participant); if (i >= 0) { lstEncounterParticipants.setSelectedIndex(i); return true; } } return false; }
private void updateMinMax() { String value = cboGoal.getText(); if (value.contains("-")) { String[] pcs = value.split("\\-"); ListUtil.selectComboboxItem(cboMin, pcs[0].trim()); ListUtil.selectComboboxItem(cboMax, pcs[1].trim()); } }
/** * Re-renders a model object. * * @param object Model object */ protected void rerender(M object) { int index = ListUtil.findListboxData(listBox, object); if (index >= 0) { rerender(listBox.getItems().get(index)); } }
private void restoreGridState() { if (selectedItem != null) { lbTests.setSelectedIndex(ListUtil.findListboxData(lbTests, selectedItem)); selectedItem = null; } updateControls(); }