PDA

View Full Version : How to save modified data in grid using service



mordor
30 May 2009, 3:26 AM
Hello! I have a problem with saving data from grid.
I have two buttons, one of them for saving, second one for rejection.


saveButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
EmptiesServices.Util.getInstance().saveEmptiesIn(emptiesStore.getModifiedRecords(), saveEmptiesCallback);
}
});

resetButton.addSelectionListener(new SelectionListener<ButtonEvent>() {
@Override
public void componentSelected(ButtonEvent ce) {
emptiesStore.rejectChanges();
}
});
But if a modify any values in grid, i coudn't call the service :(
I can call it only after:

emptiesStore.commitChanges();But I'm loose all changes.

Pls, help me, how I can get all changed data and call a service with it?