diff options
author | Teppo Kurki <teppo.kurki@vaadin.com> | 2015-06-02 15:08:03 +0300 |
---|---|---|
committer | Teppo Kurki <teppo.kurki@vaadin.com> | 2015-06-04 16:17:13 +0300 |
commit | 1b67d65d9718745edc69a51c082e917a2bbee2e0 (patch) | |
tree | 7f7176ce00d52b36f9351e0ef76aa27afc019e7f /server | |
parent | a4b2dc6caf82487903e583edfa30eec837bbb5b1 (diff) | |
download | vaadin-framework-1b67d65d9718745edc69a51c082e917a2bbee2e0.tar.gz vaadin-framework-1b67d65d9718745edc69a51c082e917a2bbee2e0.zip |
Allow programmatically opening editor in unbuffered mode
..when the editor is already open on another row
Change-Id: Ibec04dc7b1559149cf33e36fada8d676d943fc72
Diffstat (limited to 'server')
-rw-r--r-- | server/src/com/vaadin/ui/Grid.java | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/server/src/com/vaadin/ui/Grid.java b/server/src/com/vaadin/ui/Grid.java index 74f58ecf74..68676e5435 100644 --- a/server/src/com/vaadin/ui/Grid.java +++ b/server/src/com/vaadin/ui/Grid.java @@ -3383,7 +3383,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, private final String nullRepresentation; - protected AbstractRenderer(Class<T> presentationType, String nullRepresentation) { + protected AbstractRenderer(Class<T> presentationType, + String nullRepresentation) { this.presentationType = presentationType; this.nullRepresentation = nullRepresentation; } @@ -3428,6 +3429,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, /** * Null representation for the renderer + * * @return a textual representation of {@code null} */ protected String getNullRepresentation() { @@ -5819,7 +5821,8 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, * @param itemId * the id of the item to edit * @throws IllegalStateException - * if the editor is not enabled or already editing an item + * if the editor is not enabled or already editing an item in + * buffered mode * @throws IllegalArgumentException * if the {@code itemId} is not in the backing container * @see #setEditorEnabled(boolean) @@ -5828,7 +5831,7 @@ public class Grid extends AbstractFocusable implements SelectionNotifier, IllegalArgumentException { if (!isEditorEnabled()) { throw new IllegalStateException("Item editor is not enabled"); - } else if (editedItemId != null) { + } else if (isEditorBuffered() && editedItemId != null) { throw new IllegalStateException("Editing item + " + itemId + " failed. Item editor is already editing item " + editedItemId); |