eudoxem
9 Aug 2010, 5:34 AM
Hello,
I'm wondering if there is a way to know which items are added or removed in a ListField (the To ListField in a DualListField). When the buttons "Add selected" or "Remove selected" is clicked, I can get the added(removed) item in the storeAdd(storeRemove) method of the StoreListener by using
listFieldTo.getStore().addStoreListener(new StoreListener<ModelData>() {
@Override
public void storeAdd(StoreEvent<ModelData> se) {
listFieldTo.getStore().getAt(se.getIndex())
}
@Override
public void storeRemove(StoreEvent<ModelData> se) {
listFieldTo.getStore().getAt(se.getIndex())
}
}
But in a Add all/Remove all or multiple add/remove action, I cannot get all added/removed elements. I just get one of the elements.
Any hint?
I'm wondering if there is a way to know which items are added or removed in a ListField (the To ListField in a DualListField). When the buttons "Add selected" or "Remove selected" is clicked, I can get the added(removed) item in the storeAdd(storeRemove) method of the StoreListener by using
listFieldTo.getStore().addStoreListener(new StoreListener<ModelData>() {
@Override
public void storeAdd(StoreEvent<ModelData> se) {
listFieldTo.getStore().getAt(se.getIndex())
}
@Override
public void storeRemove(StoreEvent<ModelData> se) {
listFieldTo.getStore().getAt(se.getIndex())
}
}
But in a Add all/Remove all or multiple add/remove action, I cannot get all added/removed elements. I just get one of the elements.
Any hint?