T - Value typeITEM - Item typeB - Concrete builder typepublic interface FilterableSingleSelectConfigurator<T,ITEM,B extends FilterableSingleSelectConfigurator<T,ITEM,B>> extends SingleSelectableInputConfigurator<T,ITEM,B>, HasSizeConfigurator<B>, HasLabelConfigurator<B>, HasPlaceholderConfigurator<B>, HasPatternConfigurator<B>, HasAutofocusConfigurator<B>, FocusableConfigurator<com.vaadin.flow.component.Component,B>
SingleSelect input builder using a ComboBox as input component.ItemSetConfigurator.ItemCaptionGenerator<ITEM>InputConfigurator.BaseInputConfigurator<T>ComponentConfigurator.BaseComponentConfiguratorHasStyleConfigurator.BaseHasStyleConfiguratorHasEnabledConfigurator.BaseHasEnabledConfiguratorHasSizeConfigurator.BaseHasSizeConfiguratorHasLabelConfigurator.BaseHasLabelConfiguratorFULL_SIZE| Modifier and Type | Method and Description |
|---|---|
B |
allowCustomValue(boolean allowCustomValue)
Set whether custom values are allowed.
|
B |
clearButtonVisible(boolean clearButtonVisible)
Set whether to show a clear button which can be used to clear the input value.
|
static <T> FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder<T,T> |
create(Class<T> type)
Get a new
FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder to create a filterable SingleSelect, which uses a
ComboBox as input component. |
static <T,ITEM> FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder<T,ITEM> |
create(Class<T> type,
Class<ITEM> itemType,
ItemConverter<T,ITEM> itemConverter)
Get a new
FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder to create a filterable SingleSelect, which uses a
ComboBox as input component. |
static <T> FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder<T> |
create(com.holonplatform.core.property.Property<T> selectionProperty)
Get a new
FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder to create a Property model based filterable
SingleSelect, which uses a ComboBox as input component. |
static <T> FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder<T> |
create(com.holonplatform.core.property.Property<T> selectionProperty,
Function<T,Optional<com.holonplatform.core.property.PropertyBox>> itemConverter)
Get a new
FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder to create a Property model based filterable
SingleSelect, which uses a ComboBox as input component. |
B |
itemLabelGenerator(Function<ITEM,String> itemLabelGenerator)
Sets the item label generator that is used to produce the strings shown in the input for each item.
|
B |
pageSize(int pageSize)
Sets the page size, which is the number of items fetched at a time from the data provider.
|
B |
renderer(com.vaadin.flow.data.renderer.Renderer<ITEM> renderer)
Sets the
Renderer responsible to render the individual items in the list of possible choices. |
B |
withCustomValueSetListener(CustomValueSetListener<T> customValueSetListener)
Add a listener for custom value set event, which is fired when user types in a value that don't already exist in
the select items set.
|
dataSourceenumCaptionGeneratorwithSelectionListenerreadOnly, readOnly, required, required, withAdapter, withReadonlyChangeListener, withValueChangeListenercreate, elementConfiguration, hidden, id, visible, withAttachListener, withDetachListenerwithEventListener, withEventListener, withThemeNamecreate, styleName, styleNamescreate, disabled, enableddeferLocalization, withDeferredLocalizationisDeferredLocalizationEnableditemCaption, itemCaption, itemCaption, itemCaptionGeneratorcreate, fullHeight, fullSize, fullWidth, height, height, heightUndefined, maxHeight, maxWidth, minHeight, minWidth, sizeUndefined, width, width, widthUndefinedcreate, create, label, label, labelplaceholder, placeholder, placeholderpattern, preventInvalidInput, preventInvalidInputautofocustabIndex, withBlurListener, withFocusListener, withFocusShortcut, withFocusShortcutKeyB renderer(com.vaadin.flow.data.renderer.Renderer<ITEM> renderer)
Renderer responsible to render the individual items in the list of possible choices.
It doesn't affect how the selected item is rendered - that can be configured by using
HasItemCaptionConfigurator.itemCaptionGenerator(com.holonplatform.vaadin.flow.components.builders.ItemSetConfigurator.ItemCaptionGenerator).
renderer - a renderer for the items in the selection list, not nullB itemLabelGenerator(Function<ITEM,String> itemLabelGenerator)
When a renderer(Renderer) or a
HasItemCaptionConfigurator.itemCaptionGenerator(com.holonplatform.vaadin.flow.components.builders.ItemSetConfigurator.ItemCaptionGenerator)
is defined, the itemL label generator is only used to show the selected item label.
itemLabelGenerator - The item label generator to set (not null)B pageSize(int pageSize)
The page size is also the largest number of items that can support client-side filtering. If you provide more items than the page size, the component has to fall back to server-side filtering.
The default page size is 50.
pageSize - the maximum number of items sent per request, must be greater than zeroB allowCustomValue(boolean allowCustomValue)
true, the user can input a value that is not present in
the items list.allowCustomValue - Whether custom values are allowedB withCustomValueSetListener(CustomValueSetListener<T> customValueSetListener)
As a side effect makes the select allow custom values. If you don't want to allow a user to add new values to the
list once the listener is added please disable it explicitly via the allowCustomValue(boolean) method.
customValueSetListener - The listener to add (not null)B clearButtonVisible(boolean clearButtonVisible)
clearButtonVisible - true to show the clear button, false to hide itstatic <T,ITEM> FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder<T,ITEM> create(Class<T> type, Class<ITEM> itemType, ItemConverter<T,ITEM> itemConverter)
FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder to create a filterable SingleSelect, which uses a
ComboBox as input component.T - Value typeITEM - Item typetype - Selection value type (not null)itemType - Selection items type (not null)itemConverter - The item converter to use (not null)FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilderstatic <T> FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder<T,T> create(Class<T> type)
FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilder to create a filterable SingleSelect, which uses a
ComboBox as input component.T - Value typetype - Selection value type (not null)FilterableSingleSelectConfigurator.FilterableSingleSelectInputBuilderstatic <T> FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder<T> create(com.holonplatform.core.property.Property<T> selectionProperty)
FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder to create a Property model based filterable
SingleSelect, which uses a ComboBox as input component.T - Value typeselectionProperty - The property to use to represent the selection value (not null)FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilderstatic <T> FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder<T> create(com.holonplatform.core.property.Property<T> selectionProperty, Function<T,Optional<com.holonplatform.core.property.PropertyBox>> itemConverter)
FilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilder to create a Property model based filterable
SingleSelect, which uses a ComboBox as input component.T - Value typeselectionProperty - The property to use to represent the selection value (not null)itemConverter - The function to use to convert a selection value into the corresponding PropertyBox
itemFilterableSingleSelectConfigurator.PropertyFilterableSingleSelectInputBuilderCopyright © 2020 The Holon Platform. All rights reserved.