Correct usage of ListGrid.addRowEditorExitHandler() / SC.askforValue after edit
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?
|Thread Tools||Search this Thread|
|Thread||Thread Starter||Forum||Replies||Last Post|
|ListGrid Group Summary updating on add/remove but not on update?||dsammut||Smart GWT Technical Q&A||3||9th Apr 2012 21:19|
|ResultSet correct usage?||atomatom||Smart GWT Technical Q&A||10||13th Jun 2011 05:56|
|DataSource correct usage||cuthbe||Smart GWT Technical Q&A||0||29th Oct 2010 03:48|