Important Notice - Forums is archived
To simplify things and help our users to be more productive, we have archived the current forum and focus our efforts on helping developers on Stack Overflow. You can post new questions on Stack Overflow or join our Discord channel.

Vaadin lets you build secure, UX-first PWAs entirely in Java.
Free ebook & tutorial.
Reverting a Grid Cell when saveEditor fails
Hello.
The way my Grid is setup, when focus leaves a cell I call grid.saveEditor() to save the value to my container, and then save it to the DB if it passes further validation. When it fails further validation, the revert works fine. However, if it fails the saveEditor it won't revert back to the original. An alert is fired fine, so I know my code is working somewhat, but I can't get the cell to revert. I have a feeling I am missing an obvious step somewhere, but I haven't been having much luck.
Here's the code I am using, what am I doing wrong? I know that the way I am setting the value back works, because I use it regularly. I have a feeling that it isn't reverting because the editor is still active and in a weird state. Maybe I need to reset an active editor in the middle of saving somewhat differently?
ComplexModuleData moduleData = (ComplexModuleData) grid.getEditedItemId()
try {
grid.saveEditor();
}
catch (FieldGroup.CommitException e) {
Notification.show("Error", "You likely have an invalid TNA Value", Notification.Type.ERROR_MESSAGE);
grid.getContainerDataSource().getItem(moduleData).getItemProperty("tna").setValue(moduleData.getTnaOrig());
}