T - the item typepublic class ComboBoxDataView<T>
extends com.vaadin.flow.data.provider.AbstractDataView<T>
ListDataProvider or BackEndDataProvider.| Constructor and Description |
|---|
ComboBoxDataView(com.vaadin.flow.data.provider.DataCommunicator<T> dataCommunicator,
ComboBox<T> comboBox)
Creates a new generic data view for ComboBox and verifies the passed data
provider is compatible with this data view implementation.
|
| Modifier and Type | Method and Description |
|---|---|
com.vaadin.flow.shared.Registration |
addItemCountChangeListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.data.provider.ItemCountChangeEvent<?>> listener) |
T |
getItem(int index)
Gets the item at the given index from the data available in the
ComboBox's server-side.
|
Stream<T> |
getItems()
Gets the items available on the ComboBox's server-side.
|
protected Class<?> |
getSupportedDataProviderType() |
void |
setIdentifierProvider(com.vaadin.flow.data.provider.IdentifierProvider<T> identifierProvider) |
public ComboBoxDataView(com.vaadin.flow.data.provider.DataCommunicator<T> dataCommunicator, ComboBox<T> comboBox)
dataCommunicator - the data communicator of the componentcomboBox - the ComboBoxpublic T getItem(int index)
This method does not take into account the ComboBox client-side filtering, since it doesn't change the item count on the server-side, but only makes it easier for users to search through the items in the UI.
index - item index numberIndexOutOfBoundsException - requested index is outside of the data setprotected Class<?> getSupportedDataProviderType()
getSupportedDataProviderType in class com.vaadin.flow.data.provider.AbstractDataView<T>public Stream<T> getItems()
This method does not take into account the ComboBox client-side filtering, since it doesn't change the item count on the server-side, but only makes it easier for users to search through the items in the UI.
public void setIdentifierProvider(com.vaadin.flow.data.provider.IdentifierProvider<T> identifierProvider)
public com.vaadin.flow.shared.Registration addItemCountChangeListener(com.vaadin.flow.component.ComponentEventListener<com.vaadin.flow.data.provider.ItemCountChangeEvent<?>> listener)
Combo box fires ItemCountChangeEvent and notifies all the
listeners added by this method, if the items count changed, for instance,
due to adding or removing an item(s).
ComboBox's client-side filter change won't fire
ItemCountChangeEvent, since it doesn't change the item count on
the server-side, but only makes it easier for users to search through the
items in the UI.
Copyright © 2021. All rights reserved.