public void onModuleLoad()
{
ComboBox<State> box = new ComboBox<State>();
State state = new State()
state.setName("California");
state.setCode("CA");
ListStore<State> store = new ListStore<State>();
store.add(state);
box.setStore(store);
box.setDisplayField("name");
RootPanel.get().add(box);
}
The following code display's the combobox but it will not display any data. I think it is in disable mode. Don't know why?
public void onModuleLoad()
{
ComboBox<State> box = new ComboBox<State>();
State state = new State()
state.setName("California");
state.setCode("CA");
ListStore<State> store = new ListStore<State>();
store.add(state);
box.setStore(store);
box.setDisplayField("name");
box.render(RootPanel.getBodyElement());
}
Any idea why it is failing? Other than combobox rest of the GXT fields it is working.