]> source.dussan.org Git - vaadin-framework.git/commitdiff
Make ComboBox always immediate (#4054)
authorJonatan Kronqvist <jonatan@vaadin.com>
Thu, 10 Apr 2014 17:54:08 +0000 (20:54 +0300)
committerVaadin Code Review <review@vaadin.com>
Fri, 11 Apr 2014 06:17:48 +0000 (06:17 +0000)
Change-Id: I34525b7d9e78ede7f9533869326ca0c08474963a

server/src/com/vaadin/ui/ComboBox.java

index 5fb2f810111702b6d637e566197112ba83a30afe..da29618efe466e5f82f19d9ab975507a7dfdb777 100644 (file)
@@ -103,22 +103,30 @@ public class ComboBox extends AbstractSelect implements
     private boolean textInputAllowed = true;
 
     public ComboBox() {
-        setNewItemsAllowed(false);
+        initDefaults();
     }
 
     public ComboBox(String caption, Collection<?> options) {
         super(caption, options);
-        setNewItemsAllowed(false);
+        initDefaults();
     }
 
     public ComboBox(String caption, Container dataSource) {
         super(caption, dataSource);
-        setNewItemsAllowed(false);
+        initDefaults();
     }
 
     public ComboBox(String caption) {
         super(caption);
+        initDefaults();
+    }
+
+    /**
+     * Initialize the ComboBox with default settings
+     */
+    private void initDefaults() {
         setNewItemsAllowed(false);
+        setImmediate(true);
     }
 
     /**