/** Deselects all of the currently selected radio buttons and selects * the given radio button. */ public void setSelectedItem(Radio item) { if (item == null) { setSelectedIndex(-1); } else { if (item.getRadiogroup() != this) throw new UiException("Not a child: " + item); item.setSelected(true); } }
/** * Loads the registered lists into the radio group. */ private void initRegisteredLists() { for (IPatientList list : registry) { if (!list.isDisabled()) { Radio radio = new Radio(list.getName()); radio.setAttribute(ATTR_PATIENT_LIST, list); rgrpLists.appendChild(radio); if (list == favorites) { radio.setId("radFavorites"); } } } rgrpLists.setSelectedIndex(0); pendingListItem.add(new PatientListItem(null, txtWaitMessage)); }