T - the type of the items in gridpublic class GridLazyDataView<T>
extends com.vaadin.flow.data.provider.AbstractLazyDataView<T>
| Constructor and Description |
|---|
GridLazyDataView(com.vaadin.flow.data.provider.DataCommunicator<T> dataCommunicator,
Grid<T> component)
Creates a new lazy data view for grid and verifies the passed data
provider is compatible with this data view implementation.
|
| Modifier and Type | Method and Description |
|---|---|
void |
setItemCountCallback(com.vaadin.flow.data.provider.CallbackDataProvider.CountCallback<T,Void> callback)
Sets a callback that the Grid uses to get the exact item count in the
backend.
|
void |
setItemCountEstimate(int itemCountEstimate) |
void |
setItemCountFromDataProvider() |
void |
setItemCountUnknown() |
getDataCommunicator, getItem, getItemCountEstimate, getItemCountEstimateIncrease, getItems, getSupportedDataProviderType, setItemCountEstimateIncreaseaddItemCountChangeListener, equals, getIdentifierProvider, refreshAll, refreshItem, setIdentifierProvider, verifyDataProviderTypepublic GridLazyDataView(com.vaadin.flow.data.provider.DataCommunicator<T> dataCommunicator, Grid<T> component)
dataCommunicator - the data communicator of the componentcomponent - the gridpublic void setItemCountCallback(com.vaadin.flow.data.provider.CallbackDataProvider.CountCallback<T,Void> callback)
The given callback will be queried for the count instead of the data
provider DataProvider.size(Query) method when the component has a
distinct data provider set with
HasLazyDataView.setItems(BackEndDataProvider).
callback - the callback to use for determining item count in the backend,
not nullsetItemCountFromDataProvider(),
setItemCountUnknown()public void setItemCountFromDataProvider()
public void setItemCountEstimate(int itemCountEstimate)
Calling this method will clear any previously set count callback
setItemCountCallback(CallbackDataProvider.CountCallback).
public void setItemCountUnknown()
Calling this method will clear any previously set count callback
setItemCountCallback(CallbackDataProvider.CountCallback).
Copyright © 2023. All rights reserved.