]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixes #1819 : Selection with null-not allowed, but with null selected does not immedi...
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>
Sat, 14 Jun 2008 18:31:49 +0000 (18:31 +0000)
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>
Sat, 14 Jun 2008 18:31:49 +0000 (18:31 +0000)
svn changeset:4885/svn branch:trunk

src/com/itmill/toolkit/ui/Select.java

index 5b33aadd5ca90812757b47c50665a04eeca2b7f7..3c769912ba4c6a4d1603f80bd1c5a3359f5cb511 100644 (file)
@@ -169,8 +169,14 @@ public class Select extends AbstractSelect implements AbstractSelect.Filtering {
 
         while (i.hasNext()) {
 
-            // Gets the option attribute values
             final Object id = i.next();
+
+            if (!isNullSelectionAllowed() && id != null
+                    && id.equals(getNullSelectionItemId()) && !isSelected(id)) {
+                continue;
+            }
+
+            // Gets the option attribute values
             final String key = itemIdMapper.key(id);
             final String caption = getItemCaption(id);
             final Resource icon = getItemIcon(id);