1. SmartClient Version: v8.2p_2012-09-17/Pro Deployment (built 2012-09-17)
2. Firefox 15.0
Im trying to create a user confirmation when exiting edit mode in a ListGrid, but when I prompt the user with either SC.say or SC.confirm, the edit mode is ended and the row is saved, event though im still inside onEditorExit or onRowEditorExit.
Example:
Or:
Is this the intended behavior, and if so, how can I create some kind of confirmation before the row is saved?
/Tilds
2. Firefox 15.0
Im trying to create a user confirmation when exiting edit mode in a ListGrid, but when I prompt the user with either SC.say or SC.confirm, the edit mode is ended and the row is saved, event though im still inside onEditorExit or onRowEditorExit.
Example:
Code:
listGrid.addEditorExitHandler(new EditorExitHandler() {
@Override
public void onEditorExit(EditorExitEvent event) {
SC.confirm("Message", new BooleanCallback() {
@Override
public void execute(Boolean value) {
if(value == null)
listGrid.discardAllEdits();
}
});
}
});
Code:
listGrid.addRowEditorExitHandler(new RowEditorExitHandler() {
@Override
public void onRowEditorExit(final RowEditorExitEvent event) {
if(event.getNewValues().containsKey("tag"))
{
SC.ask("Message", new BooleanCallback() {
@Override
public void execute(Boolean value) {
if(!value)
event.cancel();
}
});
}
}
});
/Tilds
Comment