Community
Participate
Working Groups
{
CCombo combo = (CCombo)getControl();
if (combo != null && (!combo.isDisposed()))
Object previousValue = getValue();
String[] items = createItems(list = new ArrayList<Object>(originalList), labelProvider, filter, sorted);
combo.setItems(items);
if (items.length > 0)
// If the previous value is valid, keep it selected
if (list.contains(previousValue))
setValue(previousValue);
}
else if (items.length > 0)
combo.select(0);