diff options
author | Sauli Tähkäpää <sauli@vaadin.com> | 2014-11-07 00:00:24 +0200 |
---|---|---|
committer | Vaadin Code Review <review@vaadin.com> | 2016-03-05 08:11:58 +0000 |
commit | 1b4a659d629b4e96cfa4c8118ba2cf2926303406 (patch) | |
tree | b0955776360e57f848220d0720874b93e083de00 /server | |
parent | 4c4a65d03795c3141b5cfeb78e77f369f719eb90 (diff) | |
download | vaadin-framework-1b4a659d629b4e96cfa4c8118ba2cf2926303406.tar.gz vaadin-framework-1b4a659d629b4e96cfa4c8118ba2cf2926303406.zip |
Don't set null value for unmapped client side keys. (#15181)
Change-Id: Icff63665d6cbef5a5dfd07c64a4535f6bf55de08
Diffstat (limited to 'server')
-rw-r--r-- | server/src/com/vaadin/ui/AbstractSelect.java | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/server/src/com/vaadin/ui/AbstractSelect.java b/server/src/com/vaadin/ui/AbstractSelect.java index 9babf7e876..2714e0cbf5 100644 --- a/server/src/com/vaadin/ui/AbstractSelect.java +++ b/server/src/com/vaadin/ui/AbstractSelect.java @@ -532,13 +532,16 @@ public abstract class AbstractSelect extends AbstractField<Object> implements } else { final Object id = itemIdMapper .get(clientSideSelectedKeys[0]); - if (!isNullSelectionAllowed() && id == null) { - markAsDirty(); - } else if (id != null - && id.equals(getNullSelectionItemId())) { - setValue(null, true); + + if (id != null) { + if (isNullSelectionAllowed() + && id.equals(getNullSelectionItemId())) { + setValue(null, true); + } else { + setValue(id, true); + } } else { - setValue(id, true); + markAsDirty(); } } } |