com.vaadin.flow.data.provider.
Interface HasDataView<T,F,V extends DataView<T>>
-
Type Parameters:
T
- data typeF
- filter typeV
- DataView typeAll Superinterfaces:
public interface HasDataView<T,F,V extends DataView<T>> extends Serializable
An interface for components that get items from the generic data provider types
DataProvider
andInMemoryDataProvider
. The methods return aDataView
which has the generic API for getting information on the items.Since:
-
-
Method Summary
All Methods Modifier and Type Method and Description V
getGenericDataView()
Get the DataView for the component.
V
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.V
setItems(InMemoryDataProvider<T> dataProvider)
Sets an in-memory data provider for the component to use
-
-
-
Method Detail
-
setItems
V 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.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
V setItems(InMemoryDataProvider<T> dataProvider)
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
-
-