jtyrrell
30 Mar 2009, 6:07 PM
The removeAll() call in the method onLoad(LoadEvent le) in ListStore causes all the data to be removed.
Overriding the onLoad(LoadEvent le) method and removing the removeAll() call fixes the problem.
Steps
BasePagingLoadResult data = new BasePagingLoadResult(TestData.getClients());
MemoryProxy proxy = new MemoryProxy(data);
BasePagingLoader loader = new BasePagingLoader(proxy);
ListStore<ModelData> store = new ListStore<ModelData>(loader);
store.setSortField("lastName");
ComboBox<ModelData> combo = new ComboBox<ModelData>();
combo.setForceSelection(true);
combo.setFieldLabel("Existing Client");
combo.setDisplayField("lastName");
combo.setStore(store);
combo.setHideTrigger(true);
combo.setPageSize(10);
Cheers,
Jim
Overriding the onLoad(LoadEvent le) method and removing the removeAll() call fixes the problem.
Steps
BasePagingLoadResult data = new BasePagingLoadResult(TestData.getClients());
MemoryProxy proxy = new MemoryProxy(data);
BasePagingLoader loader = new BasePagingLoader(proxy);
ListStore<ModelData> store = new ListStore<ModelData>(loader);
store.setSortField("lastName");
ComboBox<ModelData> combo = new ComboBox<ModelData>();
combo.setForceSelection(true);
combo.setFieldLabel("Existing Client");
combo.setDisplayField("lastName");
combo.setStore(store);
combo.setHideTrigger(true);
combo.setPageSize(10);
Cheers,
Jim