Package com.vaadin.flow.data.provider
Interface HasListDataView<T,V extends ListDataView<T,?>>
-
- Type Parameters:
T- item typeV- DataView type
- All Superinterfaces:
Serializable
- All Known Implementing Classes:
CheckboxGroup,ComboBox,ComboBoxBase,CrudGrid,Grid,GridPro,ListBox,ListBoxBase,MultiSelectComboBox,MultiSelectListBox,RadioButtonGroup,Select,TreeGrid
public interface HasListDataView<T,V extends ListDataView<T,?>> extends Serializable
An interface for components that accept setting items in-memory and returns aListDataViewthat provides information and allows operations on the items.- Since:
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description VgetListDataView()Get the ListDataView for the component.VsetItems(ListDataProvider<T> dataProvider)Sets a ListDataProvider for the component to use and returns aListDataViewthat provides information and allows operations on the items.default VsetItems(Collection<T> items)Sets the items from the given Collection and returns aListDataViewthat provides information and allows operations on the items.default VsetItems(T... items)Sets the items of this component.
-
-
-
Method Detail
-
setItems
V setItems(ListDataProvider<T> dataProvider)
Sets a ListDataProvider for the component to use and returns aListDataViewthat provides information and allows operations on the items.- Parameters:
dataProvider- ListDataProvider providing items to the component.- Returns:
- ListDataView providing access to the items
-
setItems
default V setItems(Collection<T> items)
Sets the items from the given Collection and returns aListDataViewthat provides information and allows operations on the items.- Parameters:
items- the items to display, notnull- Returns:
- ListDataView providing access to the items
-
setItems
default V setItems(T... items)
Sets the items of this component.- Parameters:
items- the items to display, notnull- Returns:
- ListDataView providing access to the items
-
getListDataView
V getListDataView()
Get the ListDataView for the component. Throws if the items are not in-memory and should use another data view type likegetLazyDataView().- Returns:
- ListDataView providing access to the items
- Throws:
IllegalStateException- when list data view is not applicable andgetLazyDataView()should be used instead
-
-