diff options
author | Henrik Paul <henrik@vaadin.com> | 2015-02-02 16:51:49 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2015-02-05 06:50:44 +0000 |
commit | 323e8bb4588fcb4eefa6e988cceb8444f963d733 (patch) | |
tree | 38d6251431c43fabe3ba4e4c3afdf3edbe939ac3 /shared/src | |
parent | 2a67b961a466b512532b1f554b0fc2903d185f50 (diff) | |
download | vaadin-framework-323e8bb4588fcb4eefa6e988cceb8444f963d733.tar.gz vaadin-framework-323e8bb4588fcb4eefa6e988cceb8444f963d733.zip |
Makes it possible to change save/cancel captions in Grid editor (#16551)
Change-Id: I4e303613f66a13b3ad6a9b2284537e5548391a4a
Diffstat (limited to 'shared/src')
-rw-r--r-- | shared/src/com/vaadin/shared/ui/grid/GridConstants.java | 6 | ||||
-rw-r--r-- | shared/src/com/vaadin/shared/ui/grid/GridState.java | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/shared/src/com/vaadin/shared/ui/grid/GridConstants.java b/shared/src/com/vaadin/shared/ui/grid/GridConstants.java index b36a162476..0606e4b1cc 100644 --- a/shared/src/com/vaadin/shared/ui/grid/GridConstants.java +++ b/shared/src/com/vaadin/shared/ui/grid/GridConstants.java @@ -68,4 +68,10 @@ public final class GridConstants implements Serializable { * Event ID for item click events */ public static final String ITEM_CLICK_EVENT_ID = "itemClick"; + + /** The default save button caption in the editor */ + public static final String DEFAULT_SAVE_CAPTION = "Save"; + + /** The default cancel button caption in the editor */ + public static final String DEFAULT_CANCEL_CAPTION = "Cancel"; } diff --git a/shared/src/com/vaadin/shared/ui/grid/GridState.java b/shared/src/com/vaadin/shared/ui/grid/GridState.java index 2b18d5b642..9d94a2cb8e 100644 --- a/shared/src/com/vaadin/shared/ui/grid/GridState.java +++ b/shared/src/com/vaadin/shared/ui/grid/GridState.java @@ -146,4 +146,11 @@ public class GridState extends AbstractComponentState { /** Whether row data might contain generated cell styles */ public boolean hasCellStyleGenerator; + /** The caption for the save button in the editor */ + @DelegateToWidget + public String editorSaveCaption = GridConstants.DEFAULT_SAVE_CAPTION; + + /** The caption for the cancel button in the editor */ + @DelegateToWidget + public String editorCancelCaption = GridConstants.DEFAULT_CANCEL_CAPTION; } |