Class SelectDataView<T>

  • Type Parameters:
    T - item type
    All Implemented Interfaces:
    com.vaadin.flow.data.provider.DataView<T>, Serializable

    public class SelectDataView<T>
    extends com.vaadin.flow.data.provider.AbstractDataView<T>
    Implementation of generic data view for Select.
    Since:
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class com.vaadin.flow.data.provider.AbstractDataView

        component, dataProviderSupplier, NULL_IDENTIFIER_ERROR_MESSAGE, NULL_ITEM_ERROR_MESSAGE
    • Constructor Summary

      Constructors 
      Constructor Description
      SelectDataView​(com.vaadin.flow.function.SerializableSupplier<com.vaadin.flow.data.provider.DataProvider<T,​?>> dataProviderSupplier, Select<T> select)
      Constructs a new DataView.
      SelectDataView​(com.vaadin.flow.function.SerializableSupplier<com.vaadin.flow.data.provider.DataProvider<T,​?>> dataProviderSupplier, Select<T> select, com.vaadin.flow.function.SerializableConsumer<com.vaadin.flow.data.provider.IdentifierProvider<T>> identifierChangedCallback)
      Constructs a new DataView.
    • Constructor Detail

      • SelectDataView

        public SelectDataView​(com.vaadin.flow.function.SerializableSupplier<com.vaadin.flow.data.provider.DataProvider<T,​?>> dataProviderSupplier,
                              Select<T> select)
        Constructs a new DataView.
        Parameters:
        dataProviderSupplier - data provider supplier
        select - select instance for this DataView
      • SelectDataView

        public SelectDataView​(com.vaadin.flow.function.SerializableSupplier<com.vaadin.flow.data.provider.DataProvider<T,​?>> dataProviderSupplier,
                              Select<T> select,
                              com.vaadin.flow.function.SerializableConsumer<com.vaadin.flow.data.provider.IdentifierProvider<T>> identifierChangedCallback)
        Constructs a new DataView.
        Parameters:
        dataProviderSupplier - data provider supplier
        select - select instance for this DataView
        identifierChangedCallback - callback method which should be called when identifierProvider is changed
    • Method Detail

      • getItem

        public T getItem​(int index)
      • getSupportedDataProviderType

        protected Class<?> getSupportedDataProviderType()
        Specified by:
        getSupportedDataProviderType in class com.vaadin.flow.data.provider.AbstractDataView<T>
      • setIdentifierProvider

        public void setIdentifierProvider​(com.vaadin.flow.data.provider.IdentifierProvider<T> identifierProvider)
        Specified by:
        setIdentifierProvider in interface com.vaadin.flow.data.provider.DataView<T>
        Overrides:
        setIdentifierProvider in class com.vaadin.flow.data.provider.AbstractDataView<T>