diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/src/com/vaadin/ui/Grid.java | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/server/src/com/vaadin/ui/Grid.java b/server/src/com/vaadin/ui/Grid.java index 18d45b3b9f..bddbd7c731 100644 --- a/server/src/com/vaadin/ui/Grid.java +++ b/server/src/com/vaadin/ui/Grid.java @@ -2732,13 +2732,16 @@ public class Grid extends AbstractComponent implements SelectionNotifier, @Override public void bind(int rowIndex) { + boolean success; try { Object id = getContainerDataSource().getIdByIndex(rowIndex); doEditItem(id); + success = true; } catch (Exception e) { handleError(e); + success = false; } - getEditorRpc().confirmBind(); + getEditorRpc().confirmBind(success); } @Override @@ -2753,12 +2756,15 @@ public class Grid extends AbstractComponent implements SelectionNotifier, @Override public void save(int rowIndex) { + boolean success; try { saveEditor(); + success = true; } catch (Exception e) { handleError(e); + success = false; } - getEditorRpc().confirmSave(); + getEditorRpc().confirmSave(success); } private void handleError(Exception e) { |