Package com.vaadin.flow.data.binder
Interface HasItems<T>
- Type Parameters:
T
- the type of the displayed item
- All Superinterfaces:
Serializable
- All Known Subinterfaces:
HasDataProvider<T>
,HasFilterableDataProvider<T,
,F> HasItemsAndComponents<T>
- All Known Implementing Classes:
VirtualList
Mixin interface for components that displays a collection of items.
Note: this is gradually replaced by
HasListDataView
,
HasLazyDataView
and
HasDataView
in the components.
- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionvoid
setItems
(Collection<T> items) Sets the data items of this component provided as a collection.default void
Sets the data items of this listing provided as a stream.default void
Sets the data items of this listing.
-
Method Details
-
setItems
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.
- Parameters:
items
- the data items to display, notnull
-
setItems
Sets the data items of this listing.- Parameters:
items
- the data items to display, the array must not benull
- See Also:
-
setItems
Sets the data items of this listing provided as a stream.This is just a shorthand for
setItems(Collection)
, that collects objects in the stream to a list. Thus, using this method, instead of its array and Collection variations, doesn't save any memory.- Parameters:
streamOfItems
- the stream of data items to display, notnull
- See Also:
-