com.vaadin.shared.ui.combobox.
Class ComboBoxState
-
All Implemented Interfaces:
public class ComboBoxState extends AbstractSingleSelectState
Shared state for the ComboBox component.
Since:
7.0
See Also:
-
-
Field Summary
Fields Modifier and Type Field Description boolean
allowNewItems
True to allow the user to send new items to the server, false to only select among existing items.
String
currentFilterText
Filter string that is currently in use in the suggestion listing.
boolean
emptySelectionAllowed
True to allow selecting nothing (a special empty selection item is shown at the beginning of the list), false not to allow empty selection by the user.
String
emptySelectionCaption
Caption for item which represents empty selection.
boolean
forceDataSourceUpdate
Ensure the data source is updated when backing dataprovider has been refreshed.
int
pageLength
Number of items to show per page or 0 to disable paging.
String
placeholder
The prompt to display in an empty field.
boolean
scrollToSelectedItem
True to automatically scroll the ComboBox to show the selected item, false not to search for it in the results.
String
selectedItemCaption
The caption of the currently selected item or
null
if no item is selected.String
selectedItemIcon
Selected item icon uri.
String
suggestionPopupWidth
Suggestion pop-up's width as a CSS string.
boolean
textInputAllowed
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.
-
Fields inherited from class com.vaadin.shared.ui.AbstractSingleSelectState
selectedItemKey
-
Fields inherited from class com.vaadin.shared.AbstractFieldState
readOnly, required
-
Fields inherited from class com.vaadin.shared.ui.TabIndexState
tabIndex
-
Fields inherited from class com.vaadin.shared.AbstractComponentState
caption, captionAsHtml, description, descriptionContentMode, errorLevel, errorMessage, height, id, primaryStyleName, styles, width
-
Fields inherited from class com.vaadin.shared.communication.SharedState
enabled, registeredEventListeners, resources
-
-
Constructor Summary
Constructors Constructor Description ComboBoxState()
-
-
-
Field Detail
-
textInputAllowed
public boolean textInputAllowed
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:
8.0
-
placeholder
@NoLayout public String placeholder
The prompt to display in an empty field. Null when disabled.
-
pageLength
public int pageLength
Number of items to show per page or 0 to disable paging.
-
suggestionPopupWidth
public String suggestionPopupWidth
Suggestion pop-up's width as a CSS string. By using relative units (e.g. "50%") it's possible to set the popup's width relative to the ComboBox itself.
-
allowNewItems
public boolean allowNewItems
True to allow the user to send new items to the server, false to only select among existing items.
-
emptySelectionAllowed
public boolean emptySelectionAllowed
True to allow selecting nothing (a special empty selection item is shown at the beginning of the list), false not to allow empty selection by the user.
-
scrollToSelectedItem
public boolean scrollToSelectedItem
True to automatically scroll the ComboBox to show the selected item, false not to search for it in the results.
-
selectedItemCaption
public String selectedItemCaption
The caption of the currently selected item or
null
if no item is selected.
-
emptySelectionCaption
public String emptySelectionCaption
Caption for item which represents empty selection.
-
selectedItemIcon
public String selectedItemIcon
Selected item icon uri.
Since:
8.0
-
currentFilterText
public String currentFilterText
Filter string that is currently in use in the suggestion listing.
Since:
8.3.2
-
forceDataSourceUpdate
public boolean forceDataSourceUpdate
Ensure the data source is updated when backing dataprovider has been refreshed.
Since:
8.9
-
-