Hi Isomorphic,
I have a question regarding the correct usage of ListGrid.addRowEditorExitHandler(new RowEditorExitHandler()) in a databound ListGrid. As a security measure I want the user to re-enter a value after he changed it in the editable grid and decides to save the change by leaving the row. Therefore I add an addRowEditorExitHandler() and call SC.askforValue from it.
The problem is that the SC.ask call is asynchronous. So in the onRowEditorExit(final RowEditorExitEvent event) I have to call event.cancel() and ListGrid.cancelEditing() because I can't wait for the user to enter his data.
If the user enters the correct data, I have to build the new record on my own from event.getRecord and event.getNewValues() and feed it to the DS manually.
Doing so just doesn't feel right and I'm pretty sure there is a better way to solve the problem. Could you give me some pointers what the suggested approach is for asking the user for confirmation after a ListGrid edit?
Thanks,
Blama
I have a question regarding the correct usage of ListGrid.addRowEditorExitHandler(new RowEditorExitHandler()) in a databound ListGrid. As a security measure I want the user to re-enter a value after he changed it in the editable grid and decides to save the change by leaving the row. Therefore I add an addRowEditorExitHandler() and call SC.askforValue from it.
The problem is that the SC.ask call is asynchronous. So in the onRowEditorExit(final RowEditorExitEvent event) I have to call event.cancel() and ListGrid.cancelEditing() because I can't wait for the user to enter his data.
If the user enters the correct data, I have to build the new record on my own from event.getRecord and event.getNewValues() and feed it to the DS manually.
Doing so just doesn't feel right and I'm pretty sure there is a better way to solve the problem. Could you give me some pointers what the suggested approach is for asking the user for confirmation after a ListGrid edit?
Thanks,
Blama