com.holonplatform.vaadin.flow.components.builders

## Interface SingleSelectConfigurator<T,ITEM,B extends SingleSelectConfigurator<T,ITEM,B>>

- Type Parameters:
    `T` - Value type
    `ITEM` - Item type
    `B` - Concrete builder type
  All Superinterfaces:
    ComponentConfigurator<B>, DeferrableLocalizationConfigurator<B>, FocusableConfigurator<com.vaadin.flow.component.Component,B>, HasAutofocusConfigurator<B>, HasDeferrableLocalization, HasElementConfigurator<B>, HasEnabledConfigurator<B>, HasItemCaptionConfigurator<ITEM,B>, HasItemEnableConfigurator<ITEM,B>, HasLabelConfigurator<B>, HasPlaceholderConfigurator<B>, HasSizeConfigurator<B>, HasStyleConfigurator<B>, InputConfigurator<T,ValueHolder.ValueChangeEvent<T>,B>, ItemSetConfigurator<B>, SelectableInputConfigurator<T,T,B>, SingleSelectableInputConfigurator<T,ITEM,B>
  All Known Subinterfaces:
    SingleSelectConfigurator.DatastorePropertySingleSelectInputBuilder<T>, SingleSelectConfigurator.DatastorePropertySingleSelectInputConfigurator<T,C>, SingleSelectConfigurator.DatastoreSingleSelectInputBuilder<T,ITEM>, SingleSelectConfigurator.DatastoreSingleSelectInputConfigurator<T,ITEM,C>, SingleSelectConfigurator.PropertySingleSelectInputBuilder<T>, SingleSelectConfigurator.PropertySingleSelectInputConfigurator<T,D,C>, SingleSelectConfigurator.SingleSelectInputBuilder<T,ITEM>, SingleSelectConfigurator.SingleSelectInputConfigurator<T,ITEM,D,C>, SingleSelectConfigurator.ValidatableDatastorePropertySingleSelectInputBuilder<T>, SingleSelectConfigurator.ValidatableDatastoreSingleSelectInputBuilder<T,ITEM>, SingleSelectConfigurator.ValidatablePropertySingleSelectInputBuilder<T>, SingleSelectConfigurator.ValidatableSingleSelectInputBuilder<T,ITEM>

      public interface SingleSelectConfigurator<T,ITEM,B extends SingleSelectConfigurator<T,ITEM,B>>
      extends SingleSelectableInputConfigurator<T,ITEM,B>, HasSizeConfigurator<B>, HasLabelConfigurator<B>, HasPlaceholderConfigurator<B>, HasAutofocusConfigurator<B>, FocusableConfigurator<com.vaadin.flow.component.Component,B>, HasItemEnableConfigurator<ITEM,B>

  `SingleSelect` input builder using a `Select` as input component.
  Since:
    5.2.3

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `SingleSelectConfigurator.DatastorePropertySingleSelectInputBuilder<T>` `Property` model based `SingleSelect` input builder with `DatastoreDataProviderConfigurator` support.
    `static interface` | `SingleSelectConfigurator.DatastorePropertySingleSelectInputConfigurator<T,C extends SingleSelectConfigurator.DatastorePropertySingleSelectInputConfigurator<T,C>>` `Property` model based `SingleSelect` input configurator mode with `DatastoreDataProviderConfigurator` support.
    `static interface` | `SingleSelectConfigurator.DatastoreSingleSelectInputBuilder<T,ITEM>` `SingleSelect` input builder with `DatastoreDataProviderConfigurator` support.
    `static interface` | `SingleSelectConfigurator.DatastoreSingleSelectInputConfigurator<T,ITEM,C extends SingleSelectConfigurator.DatastoreSingleSelectInputConfigurator<T,ITEM,C>>` `SingleSelect` input configurator with `DatastoreDataProviderConfigurator` support.
    `static interface` | `SingleSelectConfigurator.PropertySingleSelectInputBuilder<T>` `Property` model based `SingleSelect` input builder.
    `static interface` | `SingleSelectConfigurator.PropertySingleSelectInputConfigurator<T,D extends DatastoreDataProviderConfigurator<com.holonplatform.core.property.PropertyBox,D>,C extends SingleSelectConfigurator.PropertySingleSelectInputConfigurator<T,D,C>>` `Property` model based `SingleSelect` input configurator.
    `static interface` | `SingleSelectConfigurator.SingleSelectInputBuilder<T,ITEM>` `SingleSelect` input builder.
    `static interface` | `SingleSelectConfigurator.SingleSelectInputConfigurator<T,ITEM,D extends DatastoreDataProviderConfigurator<ITEM,D>,C extends SingleSelectConfigurator.SingleSelectInputConfigurator<T,ITEM,D,C>>` `SingleSelect` input configurator.
    `static interface` | `SingleSelectConfigurator.ValidatableDatastorePropertySingleSelectInputBuilder<T>` `Property` model based `SingleSelect` input builder with validation and `DatastoreDataProviderConfigurator` support.
    `static interface` | `SingleSelectConfigurator.ValidatableDatastoreSingleSelectInputBuilder<T,ITEM>` `SingleSelect` input builder with validation and `DatastoreDataProviderConfigurator` support.
    `static interface` | `SingleSelectConfigurator.ValidatablePropertySingleSelectInputBuilder<T>` `Property` model based `SingleSelect` input builder with validation support.
    `static interface` | `SingleSelectConfigurator.ValidatableSingleSelectInputBuilder<T,ITEM>` `SingleSelect` input builder with validation support.

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin.flow.components.builders.ItemSetConfigurator

      `ItemSetConfigurator.ItemCaptionGenerator<ITEM>`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin.flow.components.builders.InputConfigurator

      `InputConfigurator.BaseInputConfigurator<T>`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin.flow.components.builders.ComponentConfigurator

      `ComponentConfigurator.BaseComponentConfigurator`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin.flow.components.builders.HasStyleConfigurator

      `HasStyleConfigurator.BaseHasStyleConfigurator`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin.flow.components.builders.HasEnabledConfigurator

      `HasEnabledConfigurator.BaseHasEnabledConfigurator`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin.flow.components.builders.HasSizeConfigurator

      `HasSizeConfigurator.BaseHasSizeConfigurator`

    - ### Nested classes/interfaces inherited from interface com.holonplatform.vaadin.flow.components.builders.HasLabelConfigurator

      `HasLabelConfigurator.BaseHasLabelConfigurator`

  - ### Field Summary

    - ### Fields inherited from interface com.holonplatform.vaadin.flow.components.builders.HasSizeConfigurator

      `FULL_SIZE`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> SingleSelectConfigurator.SingleSelectInputBuilder<T,T>` | `create(Class<T> type)` Get a new `SingleSelectConfigurator.SingleSelectInputBuilder` to create a `SingleSelect` which uses a `Select` as input component.
    `static <T,ITEM> SingleSelectConfigurator.SingleSelectInputBuilder<T,ITEM>` | `create(Class<T> type, Class<ITEM> itemType, ItemConverter<T,ITEM> itemConverter)` Get a new `SingleSelectConfigurator.SingleSelectInputBuilder` to create a `SingleSelect` which uses a `Select` as input component.
    `static <T> SingleSelectConfigurator.PropertySingleSelectInputBuilder<T>` | `create(com.holonplatform.core.property.Property<T> selectionProperty)` Get a new `SingleSelectConfigurator.PropertySingleSelectInputBuilder` to create a `Property` model based filterable `SingleSelect`, which uses a `Select` as input component.
    `static <T> SingleSelectConfigurator.PropertySingleSelectInputBuilder<T>` | `create(com.holonplatform.core.property.Property<T> selectionProperty, Function<T,Optional<com.holonplatform.core.property.PropertyBox>> itemConverter)` Get a new `SingleSelectConfigurator.PropertySingleSelectInputBuilder` to create a `Property` model based filterable `SingleSelect`, which uses a `Select` as input component.
    `B` | `emptySelectionAllowed(boolean emptySelectionAllowed)` Sets whether the user is allowed to select nothing.
    `B` | `emptySelectionCaption(com.holonplatform.core.i18n.Localizable emptySelectionCaption)` Sets the empty selection caption when `emptySelectionAllowed(boolean)` has been enabled.
    `default B` | `emptySelectionCaption(String emptySelectionCaption)` Sets the empty selection caption when `emptySelectionAllowed(boolean)` has been enabled.
    `default B` | `emptySelectionCaption(String defaultCaption, String messageCode, Object... arguments)` Sets the empty selection caption when `emptySelectionAllowed(boolean)` has been enabled.
    `B` | `itemLabelGenerator(Function<ITEM,String> itemLabelGenerator)` Sets the item label generator.
    `B` | `renderer(com.vaadin.flow.data.renderer.ComponentRenderer<? extends com.vaadin.flow.component.Component,ITEM> renderer)` Sets the `ComponentRenderer` responsible to render the individual items in the list of possible choices.
    `B` | `withDropDownComponent(com.vaadin.flow.component.Component component)` Adds the given component into the select drop-down area.
    `B` | `withDropDownComponentAfter(ITEM afterItem, com.vaadin.flow.component.Component component)` Adds the given component into the select drop-down area after the given item.
    `B` | `withDropDownComponentAsFirst(com.vaadin.flow.component.Component component)` Adds the given component into the select drop-down area as the first child.
    `B` | `withDropDownComponentBefore(ITEM beforeItem, com.vaadin.flow.component.Component component)` Adds the given component into the select drop-down area before the given item.
    `B` | `withPrefixComponent(com.vaadin.flow.component.Component component)` Adds the given component into the `prefix` slot.

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.SingleSelectableInputConfigurator

      `dataSource`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.ItemSetConfigurator

      `enumCaptionGenerator`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.SelectableInputConfigurator

      `withSelectionListener`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.InputConfigurator

      `readOnly, readOnly, required, required, withAdapter, withReadonlyChangeListener, withValueChangeListener`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.ComponentConfigurator

      `create, elementConfiguration, hidden, id, visible, withAttachListener, withDetachListener`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.HasElementConfigurator

      `withEventListener, withEventListener, withThemeName`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.HasStyleConfigurator

      `create, styleName, styleNames`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.HasEnabledConfigurator

      `create, disabled, enabled`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.DeferrableLocalizationConfigurator

      `deferLocalization, withDeferredLocalization`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.HasDeferrableLocalization

      `isDeferredLocalizationEnabled`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.HasItemCaptionConfigurator

      `itemCaption, itemCaption, itemCaption, itemCaptionGenerator`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.HasSizeConfigurator

      `create, fullHeight, fullSize, fullWidth, height, height, heightUndefined, maxHeight, maxWidth, minHeight, minWidth, sizeUndefined, width, width, widthUndefined`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.HasLabelConfigurator

      `create, create, label, label, label`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.HasPlaceholderConfigurator

      `placeholder, placeholder, placeholder`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.HasAutofocusConfigurator

      `autofocus`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.FocusableConfigurator

      `tabIndex, withBlurListener, withFocusListener, withFocusShortcut, withFocusShortcutKey`

    - ### Methods inherited from interface com.holonplatform.vaadin.flow.components.builders.HasItemEnableConfigurator

      `itemEnabledProvider`

- - ### Method Detail

    - #### renderer

          B renderer(com.vaadin.flow.data.renderer.ComponentRenderer<? extends com.vaadin.flow.component.Component,ITEM> renderer)

      Sets the `ComponentRenderer` responsible to render the individual items in the list of possible choices. The renderer is applied to each item to create a component which represents the item.
      Parameters:
        `renderer` - the item renderer, not `null`
      Returns:
        this

    - #### itemLabelGenerator

          B itemLabelGenerator(Function<ITEM,String> itemLabelGenerator)

      Sets the item label generator. It generates the text that is shown in the input part for the item when it has been selected.
      Parameters:
        `itemLabelGenerator` - The item label generator to set
      Returns:
        this

    - #### emptySelectionAllowed

          B emptySelectionAllowed(boolean emptySelectionAllowed)

      Sets whether the user is allowed to select nothing. When set to `true`, a special empty item is shown to the user.

      Default is `false`. The empty selection item can be customized with `emptySelectionCaption(Localizable)`.

      Parameters:
        `emptySelectionAllowed` - `true` to allow not selecting anything, `false` to require selection
      Returns:
        this

    - #### emptySelectionCaption

          B emptySelectionCaption(com.holonplatform.core.i18n.Localizable emptySelectionCaption)

      Sets the empty selection caption when `emptySelectionAllowed(boolean)` has been enabled. The caption is shown for the empty selection item in the drop down.

      When the empty selection item is selected, the select shows the value provided by `itemLabelGenerator(Function)` for the `null` item, or the string set with `HasPlaceholderConfigurator.placeholder(Localizable)` or an empty string if not placeholder is set.

      Default is an empty string "", which will show the place holder when selected.

      Parameters:
        `emptySelectionCaption` - The empty selection caption to set (not null)
      Returns:
        this
      See Also:
        `emptySelectionAllowed(boolean)`, `LocalizationProvider`

    - #### emptySelectionCaption

          default B emptySelectionCaption(String emptySelectionCaption)

      Sets the empty selection caption when `emptySelectionAllowed(boolean)` has been enabled. The caption is shown for the empty selection item in the drop down.
      Parameters:
        `emptySelectionCaption` - The empty selection caption to set
      Returns:
        this
      See Also:
        `emptySelectionCaption(Localizable)`

    - #### emptySelectionCaption

          default B emptySelectionCaption(String defaultCaption,
                                          String messageCode,
                                          Object... arguments)

      Sets the empty selection caption when `emptySelectionAllowed(boolean)` has been enabled. The caption is shown for the empty selection item in the drop down.
      Parameters:
        `defaultCaption` - Default empty selection caption if no translation is available for given `messageCode`
        `messageCode` - Empty selection caption translation message key
        `arguments` - Optional translation arguments
      Returns:
        this
      See Also:
        `LocalizationProvider`

    - #### withPrefixComponent

          B withPrefixComponent(com.vaadin.flow.component.Component component)

      Adds the given component into the `prefix` slot.
      Parameters:
        `component` - The component to add (not null)
      Returns:
        this
      Since:
        5.2.13

    - #### withDropDownComponent

          B withDropDownComponent(com.vaadin.flow.component.Component component)

      Adds the given component into the select drop-down area.
      Parameters:
        `component` - The component to add (not null)
      Returns:
        this
      Since:
        5.2.13

    - #### withDropDownComponentAsFirst

          B withDropDownComponentAsFirst(com.vaadin.flow.component.Component component)

      Adds the given component into the select drop-down area as the first child.
      Parameters:
        `component` - The component to add (not null)
      Returns:
        this
      Since:
        5.2.13

    - #### withDropDownComponentAfter

          B withDropDownComponentAfter(ITEM afterItem,
                                       com.vaadin.flow.component.Component component)

      Adds the given component into the select drop-down area after the given item.
      Parameters:
        `afterItem` - The item to add component after (not null)
        `component` - The component to add (not null)
      Returns:
        this
      Since:
        5.2.13

    - #### withDropDownComponentBefore

          B withDropDownComponentBefore(ITEM beforeItem,
                                        com.vaadin.flow.component.Component component)

      Adds the given component into the select drop-down area before the given item.
      Parameters:
        `beforeItem` - The item to add component before (not null)
        `component` - The component to add (not null)
      Returns:
        this
      Since:
        5.2.13

    - #### create

          static <T,ITEM> SingleSelectConfigurator.SingleSelectInputBuilder<T,ITEM> create(Class<T> type,
                                                                                           Class<ITEM> itemType,
                                                                                           ItemConverter<T,ITEM> itemConverter)

      Get a new `SingleSelectConfigurator.SingleSelectInputBuilder` to create a `SingleSelect` which uses a `Select` as input component.
      Type Parameters:
        `T` - Value type
        `ITEM` - Item type
      Parameters:
        `type` - Selection value type (not null)
        `itemType` - Selection items type (not null)
        `itemConverter` - The item converter to use (not null)
      Returns:
        A new `SingleSelectConfigurator.SingleSelectInputBuilder`

    - #### create

          static <T> SingleSelectConfigurator.SingleSelectInputBuilder<T,T> create(Class<T> type)

      Get a new `SingleSelectConfigurator.SingleSelectInputBuilder` to create a `SingleSelect` which uses a `Select` as input component.
      Type Parameters:
        `T` - Value type
      Parameters:
        `type` - Selection value type (not null)
      Returns:
        A new `SingleSelectConfigurator.SingleSelectInputBuilder`

    - #### create

          static <T> SingleSelectConfigurator.PropertySingleSelectInputBuilder<T> create(com.holonplatform.core.property.Property<T> selectionProperty)

      Get a new `SingleSelectConfigurator.PropertySingleSelectInputBuilder` to create a `Property` model based filterable `SingleSelect`, which uses a `Select` as input component.
      Type Parameters:
        `T` - Value type
      Parameters:
        `selectionProperty` - The property to use to represent the selection value (not null)
      Returns:
        A new `SingleSelectConfigurator.PropertySingleSelectInputBuilder`

    - #### create

          static <T> SingleSelectConfigurator.PropertySingleSelectInputBuilder<T> create(com.holonplatform.core.property.Property<T> selectionProperty,
                                                                                         Function<T,Optional<com.holonplatform.core.property.PropertyBox>> itemConverter)

      Get a new `SingleSelectConfigurator.PropertySingleSelectInputBuilder` to create a `Property` model based filterable `SingleSelect`, which uses a `Select` as input component.
      Type Parameters:
        `T` - Value type
      Parameters:
        `selectionProperty` - 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` item
      Returns:
        A new `SingleSelectConfigurator.PropertySingleSelectInputBuilder`

Copyright © 2019 The Holon Platform. All rights reserved.