com.holonplatform.vaadin.flow.components.builders

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

- Type Parameters:
    `T` - Value type
    `ITEM` - Item type
    `B` - Concrete builder type
  All Superinterfaces:
    ComponentConfigurator<B>, DeferrableLocalizationConfigurator<B>, HasDeferrableLocalization, HasElementConfigurator<B>, HasEnabledConfigurator<B>, HasLabelConfigurator<B>, HasStyleConfigurator<B>, InputBuilder<T,ValueHolder.ValueChangeEvent<T>,SingleSelect<T>,B>, InputConfigurator<T,ValueHolder.ValueChangeEvent<T>,B>, ItemSetConfigurator<B>, SelectableInputConfigurator<T,T,B>, SingleSelectInputBuilder<T,ITEM,B>
  All Known Subinterfaces:
    OptionsModeSingleSelectInputBuilder.DatastoreItemOptionsModeSingleSelectInputBuilder<T,ITEM>, OptionsModeSingleSelectInputBuilder.DatastorePropertyOptionsModeSingleSelectInputBuilder<T>, OptionsModeSingleSelectInputBuilder.ItemOptionsModeSingleSelectInputBuilder<T,ITEM>, OptionsModeSingleSelectInputBuilder.PropertyOptionsModeSingleSelectInputBuilder<T>

      public interface OptionsModeSingleSelectInputBuilder<T,ITEM,B extends OptionsModeSingleSelectInputBuilder<T,ITEM,B>>
      extends SingleSelectInputBuilder<T,ITEM,B>, HasLabelConfigurator<B>

  `SingleSelect` input builder for the options rendering mode.
  Since:
    5.2.0

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Interface and Description
    --- | ---
    `static interface` | `OptionsModeSingleSelectInputBuilder.DatastoreItemOptionsModeSingleSelectInputBuilder<T,ITEM>` `SingleSelect` input builder for the options rendering mode with `DatastoreDataProviderConfigurator` support.
    `static interface` | `OptionsModeSingleSelectInputBuilder.DatastorePropertyOptionsModeSingleSelectInputBuilder<T>` `Property` model based `SingleSelect` input builder for the options rendering mode with `DatastoreDataProviderConfigurator` support.
    `static interface` | `OptionsModeSingleSelectInputBuilder.ItemOptionsModeSingleSelectInputBuilder<T,ITEM>` `SingleSelect` input builder for the options rendering mode.
    `static interface` | `OptionsModeSingleSelectInputBuilder.PropertyOptionsModeSingleSelectInputBuilder<T>` `Property` model based `SingleSelect` input builder for the options rendering mode.

    - ### 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`

  - ### Method Summary

    All Methods Static Methods Instance Methods Abstract Methods Default Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T> OptionsModeSingleSelectInputBuilder.ItemOptionsModeSingleSelectInputBuilder<T,T>` | `create(Class<T> type)` Create a new `OptionsModeSingleSelectInputBuilder.ItemOptionsModeSingleSelectInputBuilder`.
    `static <T,ITEM> OptionsModeSingleSelectInputBuilder.ItemOptionsModeSingleSelectInputBuilder<T,ITEM>` | `create(Class<T> type, Class<ITEM> itemType, ItemConverter<T,ITEM> itemConverter)` Create a new `OptionsModeSingleSelectInputBuilder.ItemOptionsModeSingleSelectInputBuilder`.
    `static <T> OptionsModeSingleSelectInputBuilder.PropertyOptionsModeSingleSelectInputBuilder<T>` | `create(com.holonplatform.core.property.Property<T> selectionProperty)` Create a new `OptionsModeSingleSelectInputBuilder.PropertyOptionsModeSingleSelectInputBuilder` using given selection `Property` and converter.
    `static <T> OptionsModeSingleSelectInputBuilder.PropertyOptionsModeSingleSelectInputBuilder<T>` | `create(com.holonplatform.core.property.Property<T> selectionProperty, Function<T,Optional<com.holonplatform.core.property.PropertyBox>> itemConverter)` Create a new `OptionsModeSingleSelectInputBuilder.PropertyOptionsModeSingleSelectInputBuilder` using given selection `Property`.
    `B` | `dataSource(com.vaadin.flow.data.provider.ListDataProvider<ITEM> dataProvider)` Set the items data provider using a `ListDataProvider`.
    `B` | `itemCaption(ITEM item, com.holonplatform.core.i18n.Localizable caption)` Set an explicit caption for given item.
    `default B` | `itemCaption(ITEM item, String caption)` Set an explicit caption for given item.
    `default B` | `itemCaption(ITEM item, String caption, String messageCode)` Set an explicit caption for given item.
    `B` | `itemCaptionGenerator(ItemSetConfigurator.ItemCaptionGenerator<ITEM> itemCaptionGenerator)` Set the generator to be used to display item captions (i.e. labels).
    `B` | `itemEnabledProvider(com.vaadin.flow.function.SerializablePredicate<ITEM> itemEnabledProvider)` Sets the item enabled state predicate.
    `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.

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

      `build, validatable`

    - ### 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, withValueChangeListener`

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

      `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

      `styleName, styleNames`

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

      `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.HasLabelConfigurator

      `label, label, label`

- - ### 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

    - #### itemEnabledProvider

          B itemEnabledProvider(com.vaadin.flow.function.SerializablePredicate<ITEM> itemEnabledProvider)

      Sets the item enabled state predicate. The predicate is applied to each item to determine whether the item should be enabled (`true`) or disabled (`false`).
      Parameters:
        `itemEnabledProvider` - the item enable predicate, not `null`
      Returns:
        this

    - #### itemCaptionGenerator

          B itemCaptionGenerator(ItemSetConfigurator.ItemCaptionGenerator<ITEM> itemCaptionGenerator)

      Set the generator to be used to display item captions (i.e. labels).
      Parameters:
        `itemCaptionGenerator` - The generator to set (not null)
      Returns:
        this

    - #### itemCaption

          B itemCaption(ITEM item,
                        com.holonplatform.core.i18n.Localizable caption)

      Set an explicit caption for given item.

      This is an alternative for `itemCaptionGenerator(com.holonplatform.vaadin.flow.components.builders.ItemSetConfigurator.ItemCaptionGenerator)`. When an `ItemCaptionGenerator` is configured, explicit item captions will be ignored.

      Parameters:
        `item` - Item to set the caption for (not null)
        `caption` - Item caption (not null)
      Returns:
        this

    - #### itemCaption

          default B itemCaption(ITEM item,
                                String caption)

      Set an explicit caption for given item.
      Parameters:
        `item` - Item to set the caption for (not null)
        `caption` - Item caption
      Returns:
        this

    - #### itemCaption

          default B itemCaption(ITEM item,
                                String caption,
                                String messageCode)

      Set an explicit caption for given item.
      Parameters:
        `item` - Item to set the caption for (not null)
        `caption` - Item caption
        `messageCode` - Item caption translation code
      Returns:
        this

    - #### dataSource

          B dataSource(com.vaadin.flow.data.provider.ListDataProvider<ITEM> dataProvider)

      Set the items data provider using a `ListDataProvider`.

      Filtering will use a case insensitive match to show all items where the filter text is a substring of the label displayed for that item, which you can configure with `itemCaptionGenerator(com.holonplatform.vaadin.flow.components.builders.ItemSetConfigurator.ItemCaptionGenerator)`.

      Parameters:
        `dataProvider` - The data provider to set
      Returns:
        this

    - #### create

          static <T,ITEM> OptionsModeSingleSelectInputBuilder.ItemOptionsModeSingleSelectInputBuilder<T,ITEM> create(Class<T> type,
                                                                                                                     Class<ITEM> itemType,
                                                                                                                     ItemConverter<T,ITEM> itemConverter)

      Create a new `OptionsModeSingleSelectInputBuilder.ItemOptionsModeSingleSelectInputBuilder`.
      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 `OptionsModeSingleSelectInputBuilder.ItemOptionsModeSingleSelectInputBuilder`

    - #### create

          static <T> OptionsModeSingleSelectInputBuilder.ItemOptionsModeSingleSelectInputBuilder<T,T> create(Class<T> type)

      Create a new `OptionsModeSingleSelectInputBuilder.ItemOptionsModeSingleSelectInputBuilder`.
      Type Parameters:
        `T` - Value type
      Parameters:
        `type` - Selection value type (not null)
      Returns:
        A new `OptionsModeSingleSelectInputBuilder.ItemOptionsModeSingleSelectInputBuilder`

    - #### create

          static <T> OptionsModeSingleSelectInputBuilder.PropertyOptionsModeSingleSelectInputBuilder<T> create(com.holonplatform.core.property.Property<T> selectionProperty)

      Create a new `OptionsModeSingleSelectInputBuilder.PropertyOptionsModeSingleSelectInputBuilder` using given selection `Property` and converter.
      Type Parameters:
        `T` - Value type
      Parameters:
        `selectionProperty` - The property to use to represent the selection value (not null)
      Returns:
        A new `OptionsModeSingleSelectInputBuilder.PropertyOptionsModeSingleSelectInputBuilder`

    - #### create

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

      Create a new `OptionsModeSingleSelectInputBuilder.PropertyOptionsModeSingleSelectInputBuilder` using given selection `Property`.
      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 `OptionsModeSingleSelectInputBuilder.PropertyOptionsModeSingleSelectInputBuilder`

Copyright © 2019 The Holon Platform. All rights reserved.