summaryrefslogtreecommitdiffstats
path: root/server
diff options
context:
space:
mode:
Diffstat (limited to 'server')
-rw-r--r--server/src/com/vaadin/ui/AbstractSelect.java15
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();
}
}
}