From 0e1a271cc5e465a774f0d729fc9ad38b300757de Mon Sep 17 00:00:00 2001 From: Henri Sara Date: Thu, 5 Nov 2015 10:51:56 +0200 Subject: Use shared state in ComboBox (#19229) This change uses shared state for the read-only flag, text input allowed flag and input prompt. Change-Id: If770a3d9be96d10c3a19654b398bc2f5ddfb7e67 --- .../com/vaadin/shared/ui/combobox/ComboBoxState.java | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'shared/src') diff --git a/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxState.java b/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxState.java index 46e24aa266..1856aac00d 100644 --- a/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxState.java +++ b/shared/src/main/java/com/vaadin/shared/ui/combobox/ComboBoxState.java @@ -26,4 +26,22 @@ public class ComboBoxState extends AbstractSelectState { { primaryStyleName = "v-filterselect"; } + + /** + * If text input is not allowed, the ComboBox behaves like a pretty + * NativeSelect - the user can not enter any text and clicking the text + * field opens the drop down with options. + * + * @since + */ + public boolean textInputAllowed = true; + + /** + * A textual prompt that is displayed when the select would otherwise be + * empty, to prompt the user for input. + * + * @since + */ + public String inputPrompt = null; + } -- cgit v1.2.3