Using GWT + GXT. Is it possible to change an active row editor state by eg messagebox? I created an event which calls a messagebox with text area and in order to put text from that textarea into grid i need to call rowEditor.stopEditing(true), then manually insert text into data grid, and then perform rowEditor.startEditing(true). So it look like:
re.stopEditing(true);
List<Model> list = data.getModels();
list.get(activeRow).set("key","value");
re.startEditing(activeRow, true);
And it works... But user can not cancel his changes if needed, because they were already saved by re.stopEditing(true);
It sounds like if
stopEditing
causes a state change you don't want (saved changes), and there is no other API to skip that side effect, then there are a few potential options (as I'm not familiar with this library, I'll be speaking to the general pattern):stopEditing
, you could implement a cancel operation just by restoring the original model.stopEditing
- can you extend the class to override this method, removing the undesired functionality? If there are a bunch of private variables involved, you can always expose them to your extension via reflection, or make your extension as detailed as necessary to cover the changes.Hopefully one of these will be able to apply to your situation.