I have a DualListField rendered in one of my pages and I need to load 1000+ items into each listField. Since GXT does lot of iterations while selecting/loading the items, I constantly get IE unresponsiveness alert.
To solve this above issue, I tried to add items in chunks of 50 by using GWTs DeferredCommand. This solution too is not successful enough to solve the IE alert...
Here is my code
Code:
public class MyDualListField
extends LayoutContainer {
private DualListField<ModelData> dualList;
@Override
protected void onRender(Element parent, int pos) {
super.onRender(parent, pos);
dualList = new DualListField<ModelData>();
dualList.setFieldLabel("My Label");
List<ModelData> models = new ArrayList<ModelData>();
for (int i = 0; i < 1000; i++) {
BaseModelData modelData = new BaseModelData();
modelData.set("id", "id" + i);
modelData.set("name", "name" + i);
models.add(modelData);
}
ListField<ModelData> from = dualList.getFromList();
ListStore<ModelData> fromStore = new ListStore<ModelData>();
from.setDisplayField("name");
from.setStore(fromStore);
from.getStore().add(models);
ListField<ModelData> to = dualList.getToList();
ListStore<ModelData> toStore = new ListStore<ModelData>();
to.setDisplayField("name");
to.setStore(toStore);
to.getStore().add(models);
add(dualList);
}
}
Any inputs ??