com.vaadin.flow.data.provider.
Interface HasDataView<T,F,V extends DataView<T>>
Type Parameters:
T
- data type
F
- filter type
V
- DataView type
All Superinterfaces:
All Known Implementing Classes:
CheckboxGroup
, ComboBox
, ComboBoxBase
, CrudGrid
, Grid
, GridPro
, ListBox
, ListBoxBase
, MultiSelectComboBox
, MultiSelectListBox
, RadioButtonGroup
, Select
, TreeGrid
An interface for components that get items from the generic data provider
types DataProvider
and InMemoryDataProvider
. The methods
return a DataView
which has the generic API for getting information
on the items.
Since:
-
Method Summary
Modifier and TypeMethodDescriptionGet the DataView for the component.
setItems
(DataProvider<T, F> dataProvider) Set a generic data provider for the component to use and returns the base
DataView
that provides API to get information on the items.setItems
(InMemoryDataProvider<T> dataProvider) Sets an in-memory data provider for the component to use
-
Method Details
-
setItems
Set a generic data provider for the component to use and returns the base
DataView
that provides API to get information on the items.This method should be used only when the data provider type is not either
ListDataProvider
orBackEndDataProvider
.Parameters:
dataProvider
- DataProvider instance to use, notnull
Returns:
DataView providing information on the data
-
setItems
Sets an in-memory data provider for the component to use
Note! Using a
ListDataProvider
instead of aInMemoryDataProvider
is recommended to get access toListDataView
API by usingHasListDataView.setItems(ListDataProvider)
.Parameters:
dataProvider
- InMemoryDataProvider to use, notnull
Returns:
DataView providing information on the data
-
getGenericDataView
V getGenericDataView()Get the DataView for the component.
The returned DataView only contains a minimal common API. Use of
HasListDataView.getListDataView()
orHasLazyDataView.getLazyDataView()
should be used for more targeted helper featuresReturns:
DataView instance
-