for (int i=0; i<comp.getModel().getSize(); i++) {
if (comp.getModel().getElementAt(i) instanceof ListElement) {
elements.add((ListElement)comp.getModel().getElementAt(i));
}
}
comp.setModel(new DropListModel(elements, comp));
}
// TF:28/07/2009:Changed this to return the data from the underlying model. We cannot pass (ListField)comp as the
// second parameter for historical reasons -- this get method was invoked directly from the main thread due to a
// generator bug, and the solution admistered to the code was to have this method calling ElementList.get() indirectly.
// If we pass (ListField)comp here, it will call ElementList.get(comp) which is this method and hence enters