com.vaadin.flow.data.binder.

Interface HasDataProvider<T>

Type Parameters:

T - the item data type

All Superinterfaces:

HasItems<T>, Serializable

All Known Implementing Classes:

VirtualList

public interface HasDataProvider<T> extends HasItems<T>

A generic interface for listing components that use a data provider for showing data.

A listing component should implement either this interface or HasFilterableDataProvider, but not both.

Since:

1.0.

Author:

Vaadin Ltd

See Also:

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    setDataProvider(DataProvider<T,?> dataProvider)

    Sets the data provider for this listing.

    default void

    Sets the data items of this component provided as a collection.

    Methods inherited from interface com.vaadin.flow.data.binder.HasItems

    setItems, setItems
  • Method Details

    • setDataProvider

      void setDataProvider(DataProvider<T,?> dataProvider)

      Sets the data provider for this listing. The data provider is queried for displayed items as needed.

      Parameters:

      dataProvider - the data provider, not null

    • setItems

      default void setItems(Collection<T> items)

      Description copied from interface: HasItems

      Sets the data items of this component provided as a collection.

      The provided collection instance may be used as-is. Subsequent modification of the collection might cause inconsistent data to be shown in the component unless it is explicitly instructed to read the data again.

      Specified by:

      setItems in interface HasItems<T>

      Parameters:

      items - the data items to display, not null