I tried the whole day to bind a list of Strings to a ComboBox and it seems that I have two problems, that I cannot fix by myself and I'm running ou of time finishing my diploma in spring and spring-rcp...
First is, that if I bind a list of cities (about 25000 Strings) to a ComboBox it takes about one minute until the gui refreshes... Is it normal, that it takes so long for binding 25000 String values in a list? If I bind only 1000 values it works fine and fast... And if I outcomment the line where the formbuilder adds the comboBox to the form refreshing-speed turns back to normal speed... As I found out its not the creation of the listmodel nor the creation of the comboBox itsself... It seem to hang somewhere in the background, when the DefaultViewDescriptor which contains the form is called to showup...
here is my code for binding the comboBox:
ListListModel model = new ListListModel(service.getCities()); // about 25000 on startup
Binding cityBinding = sbf.createBoundComboBox("mainAddress.city", model);
My second problem is, that I want the data in the comboBox being updated (e.g. when the user types in a postcode, the city-combobox will show only the cities, that match the postcode).
I thought that the gui would update itself when the underlaying data changes, like in all other bound forms. When I call the service with it delivers the right cities and the comboBoxModel has the right size after updating the list, but even if I revalidate and repaint everything in my form manually, the comboBox will not show the updated list. it's empty.
Is it possible to wire a pre-configured Binding in the apllication-context to safe time on creation?
System.out.println("size: "+model.size()); // holds the right length and the right data after updating the model, but not showing it in gui...