From f374bc72f5fe3535600551a14eb3df2d97889ba2 Mon Sep 17 00:00:00 2001 From: Jonatan Kronqvist Date: Thu, 10 Apr 2014 20:54:08 +0300 Subject: [PATCH] Make ComboBox always immediate (#4054) Change-Id: I34525b7d9e78ede7f9533869326ca0c08474963a --- server/src/com/vaadin/ui/ComboBox.java | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/server/src/com/vaadin/ui/ComboBox.java b/server/src/com/vaadin/ui/ComboBox.java index 5fb2f81011..da29618efe 100644 --- a/server/src/com/vaadin/ui/ComboBox.java +++ b/server/src/com/vaadin/ui/ComboBox.java @@ -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); } /** -- 2.39.5