I am trying to draw a comboBox using EXT GWT . My issue is i get an
illegalStateException when i do the following code .
final ComboBox<CountryState> combo = new ComboBox< CountryState >
();
combo.setEmptyText("Select a Country...");
combo.setDisplayField("value");
combo.setStore(countryStateStore); //At this Stage the Store
Value is empty , if i dont do this it throws an exception
combo.setTypeAhead(true);
myService.loadCountryState(
new HelpAsyncCallback<List<CountrySate>>() {
@Override
public void onSuccess(List< CountrySate
> obj) {
GWT.log("obj is "+obj, null);
countryStateStore.add(obj);
combo.setStore(countryStateStore);
}
});
//I do not want to push the the following 2 line of code in the
loadCountryState method . I am not sure whats causing the exception
vp.add(new HTML("SELECT Country LIST"));
vp.add(combo);//
Vp : Vertical Panel . I think this is what is happening , maybe even
before the async Value is returned , these two lines of code are
drawn . At this point the combo box gets painted with maybe empty
store . Maybe I am wrong .
vp.add(new HTML("SELECT FAVORITES LIST"));
vp.add(combo);
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/Google-Web-Toolkit?hl=en
-~----------~----~----~----~------~----~------~--~---