void (Item selection) { Ref selectedItem = getSelectedString(); myItems.clear(); myItems.putAll(ContainerUtil.newMapFromValues(getAllListItems(), myToString)); SortedComboBoxModel<Ref> model = getModel(); model.setAll(myItems.keySet()); if (selection != null) model.setSelectedItem(myToString.convert(selection)); else model.setSelectedItem(selectedItem); }