diff options
Diffstat (limited to 'shared')
-rw-r--r-- | shared/src/com/vaadin/shared/ui/grid/EditorRowClientRpc.java | 14 | ||||
-rw-r--r-- | shared/src/com/vaadin/shared/ui/grid/EditorRowServerRpc.java | 19 |
2 files changed, 33 insertions, 0 deletions
diff --git a/shared/src/com/vaadin/shared/ui/grid/EditorRowClientRpc.java b/shared/src/com/vaadin/shared/ui/grid/EditorRowClientRpc.java index 1c99a5035d..d6822cfccc 100644 --- a/shared/src/com/vaadin/shared/ui/grid/EditorRowClientRpc.java +++ b/shared/src/com/vaadin/shared/ui/grid/EditorRowClientRpc.java @@ -34,6 +34,14 @@ public interface EditorRowClientRpc extends ClientRpc { void bind(int rowIndex); /** + * Tells the client to discard unsaved changes in the editor row. + * + * @param rowIndex + * the index of the edited row + */ + void discard(int rowIndex); + + /** * Tells the client to cancel editing and hide the editor row. * * @param rowIndex @@ -46,4 +54,10 @@ public interface EditorRowClientRpc extends ClientRpc { * by the client. */ void confirmBind(); + + /** + * Confirms a pending {@link EditorRowServerRpc#commit(int) commit request} + * sent by the client. + */ + void confirmCommit(); } diff --git a/shared/src/com/vaadin/shared/ui/grid/EditorRowServerRpc.java b/shared/src/com/vaadin/shared/ui/grid/EditorRowServerRpc.java index 45705ca924..25bafe2da1 100644 --- a/shared/src/com/vaadin/shared/ui/grid/EditorRowServerRpc.java +++ b/shared/src/com/vaadin/shared/ui/grid/EditorRowServerRpc.java @@ -37,6 +37,25 @@ public interface EditorRowServerRpc extends ServerRpc { void bind(int rowIndex); /** + * Asks the server to commit unsaved changes in the editor row to the data + * source. When a commit request is sent, it must be acknowledged with a + * {@link EditorRowClientRpc#confirmCommit() confirm call}. + * + * @param rowIndex + * the index of the edited row + */ + void commit(int rowIndex); + + /** + * Asks the server to replace any unsaved changes with values from the data + * source. + * + * @param rowIndex + * the index of the edited row + */ + void discard(int rowIndex); + + /** * Tells the server to cancel editing. When sending a cancel request, the * client does not need to wait for confirmation by the server before hiding * the editor row. |