brom38
22 Jul 2008, 5:37 AM
When I try commit or reject changes for "dirty" Store I recieve java.util.ConcurrentModificationException.
com.extjs.gxt.ui.client.store.Store.java
...
public void rejectChanges() {
for (Record r : modified) { // iterate through "modified" list
r.reject(false); // in this method fire: store.afterReject(this);
}
modified.clear();
}
...
protected void afterReject(Record record) {
modified.remove(record); // change "modified" list !!!!
// in next iteration through "modified" list in rejectChanges() I recieve ConcurrentModificationException
fireStoreEvent(Update, RecordUpdate.REJECT, record);
}
com.extjs.gxt.ui.client.store.Store.java
...
public void rejectChanges() {
for (Record r : modified) { // iterate through "modified" list
r.reject(false); // in this method fire: store.afterReject(this);
}
modified.clear();
}
...
protected void afterReject(Record record) {
modified.remove(record); // change "modified" list !!!!
// in next iteration through "modified" list in rejectChanges() I recieve ConcurrentModificationException
fireStoreEvent(Update, RecordUpdate.REJECT, record);
}