@Tag(value="vaadin-list-box")
@NpmPackage(value="@vaadin/vaadin-list-box",
version="2.0.0")
@JsModule(value="@vaadin/vaadin-list-box/src/vaadin-list-box.js")
public abstract class ListBoxBase<C extends ListBoxBase<C,ITEM,VALUE>,ITEM,VALUE>
extends com.vaadin.flow.component.AbstractSinglePropertyField<C,VALUE>
implements com.vaadin.flow.data.binder.HasItemComponents<ITEM>, com.vaadin.flow.component.HasSize, com.vaadin.flow.data.provider.HasListDataView<ITEM,ListBoxListDataView<ITEM>>, com.vaadin.flow.data.provider.HasDataView<ITEM,Void,ListBoxDataView<ITEM>>
ListBox and MultiSelectListBox.com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends com.vaadin.flow.component.Component,V>| Modifier and Type | Method and Description |
|---|---|
com.vaadin.flow.data.provider.DataProvider<ITEM,?> |
getDataProvider()
Deprecated.
use
getListDataView() or
getGenericDataView() instead |
ListBoxDataView<ITEM> |
getGenericDataView()
Gets the generic data view for the ListBox.
|
com.vaadin.flow.function.SerializablePredicate<ITEM> |
getItemEnabledProvider()
Returns the item enabled predicate.
|
protected Object |
getItemId(ITEM item) |
com.vaadin.flow.data.renderer.ComponentRenderer<? extends com.vaadin.flow.component.Component,ITEM> |
getItemRenderer()
Returns the item component renderer.
|
ListBoxListDataView<ITEM> |
getListDataView()
Gets the list data view for the ListBox.
|
protected void |
onAttach(com.vaadin.flow.component.AttachEvent attachEvent) |
protected void |
onDetach(com.vaadin.flow.component.DetachEvent detachEvent) |
void |
onEnabledStateChanged(boolean enabled) |
void |
setDataProvider(com.vaadin.flow.data.provider.DataProvider<ITEM,?> dataProvider)
Deprecated.
use instead one of the
setItems methods which provide
access to either ListBoxListDataView or
ListBoxDataView |
void |
setItemEnabledProvider(com.vaadin.flow.function.SerializablePredicate<ITEM> itemEnabledProvider)
Sets the item enabled predicate for this ListBox.
|
ListBoxDataView<ITEM> |
setItems(com.vaadin.flow.data.provider.DataProvider<ITEM,Void> dataProvider)
Set a generic data provider for the ListBox to use and returns the base
ListBoxDataView that provides API to get information on the items. |
ListBoxDataView<ITEM> |
setItems(com.vaadin.flow.data.provider.InMemoryDataProvider<ITEM> inMemoryDataProvider)
Sets an in-memory data provider for the ListBox to use
|
ListBoxListDataView<ITEM> |
setItems(com.vaadin.flow.data.provider.ListDataProvider<ITEM> listDataProvider)
Sets a ListDataProvider for the ListBox to use and returns a
ListDataView that provides information and allows operations on
the items. |
void |
setItems(Stream<ITEM> streamOfItems)
Deprecated.
Because the stream is collected to a list anyway, use
HasListDataView.setItems(Collection) instead. |
void |
setRenderer(com.vaadin.flow.data.renderer.ComponentRenderer<? extends com.vaadin.flow.component.Component,ITEM> itemRenderer)
Sets the item renderer for this ListBox.
|
void |
setRequiredIndicatorVisible(boolean requiredIndicatorVisible)
Not supported!
|
getSynchronizationRegistration, hasValidValue, setPresentationValue, setSynchronizedEventaddValueChangeListener, getEmptyValue, getValue, isEmpty, setModelValue, setValue, valueEqualsaddListener, fireEvent, from, get, getChildren, getElement, getEventBus, getId, getLocale, getParent, getTranslation, getTranslation, getUI, hasListener, isAttached, isTemplateMapped, isVisible, set, setElement, setId, setVisibleclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddComponents, getItemPosition, prependComponentsadd, add, addComponentAsFirst, addComponentAtIndex, remove, removeAllgetCssSize, getHeight, getMaxHeight, getMaxWidth, getMinHeight, getMinWidth, getWidth, setHeight, setHeight, setHeightFull, setMaxHeight, setMaxHeight, setMaxWidth, setMaxWidth, setMinHeight, setMinHeight, setMinWidth, setMinWidth, setSizeFull, setSizeUndefined, setWidth, setWidth, setWidthFull@Deprecated public void setDataProvider(com.vaadin.flow.data.provider.DataProvider<ITEM,?> dataProvider)
setItems methods which provide
access to either ListBoxListDataView or
ListBoxDataViewprotected void onAttach(com.vaadin.flow.component.AttachEvent attachEvent)
onAttach in class com.vaadin.flow.component.Componentprotected void onDetach(com.vaadin.flow.component.DetachEvent detachEvent)
onDetach in class com.vaadin.flow.component.Component@Deprecated public com.vaadin.flow.data.provider.DataProvider<ITEM,?> getDataProvider()
getListDataView() or
getGenericDataView() insteadnullpublic com.vaadin.flow.data.renderer.ComponentRenderer<? extends com.vaadin.flow.component.Component,ITEM> getItemRenderer()
setRenderer(com.vaadin.flow.data.renderer.ComponentRenderer<? extends com.vaadin.flow.component.Component, ITEM>)public void setRenderer(com.vaadin.flow.data.renderer.ComponentRenderer<? extends com.vaadin.flow.component.Component,ITEM> itemRenderer)
itemRenderer - the item renderer, not nullpublic void setItemEnabledProvider(com.vaadin.flow.function.SerializablePredicate<ITEM> itemEnabledProvider)
true) or disabled (false). Disabled items are displayed
as grayed out and the user cannot select them. The default predicate
always returns true (all the items are enabled).itemEnabledProvider - the item enable predicate, not nullpublic com.vaadin.flow.function.SerializablePredicate<ITEM> getItemEnabledProvider()
setItemEnabledProvider(com.vaadin.flow.function.SerializablePredicate<ITEM>)public void setRequiredIndicatorVisible(boolean requiredIndicatorVisible)
Not supported by the client-side web-component, see issue in GitHub.
setRequiredIndicatorVisible in interface com.vaadin.flow.component.HasValue<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends ListBoxBase<C,ITEM,VALUE>,VALUE>,VALUE>setRequiredIndicatorVisible in interface com.vaadin.flow.component.HasValueAndElement<com.vaadin.flow.component.AbstractField.ComponentValueChangeEvent<C extends ListBoxBase<C,ITEM,VALUE>,VALUE>,VALUE>UnsupportedOperationExceptionpublic void onEnabledStateChanged(boolean enabled)
onEnabledStateChanged in class com.vaadin.flow.component.Componentpublic ListBoxDataView<ITEM> setItems(com.vaadin.flow.data.provider.DataProvider<ITEM,Void> dataProvider)
ListBoxDataView that provides API to get information on the items.
This method should be used only when the data provider type is not either
ListDataProvider or BackEndDataProvider.
setItems in interface com.vaadin.flow.data.provider.HasDataView<ITEM,Void,ListBoxDataView<ITEM>>dataProvider - DataProvider instance to use, not nullpublic ListBoxDataView<ITEM> setItems(com.vaadin.flow.data.provider.InMemoryDataProvider<ITEM> inMemoryDataProvider)
Note! Using a ListDataProvider instead of a
InMemoryDataProvider is recommended to get access to
ListBoxListDataView API by using
HasListDataView.setItems(ListDataProvider).
setItems in interface com.vaadin.flow.data.provider.HasDataView<ITEM,Void,ListBoxDataView<ITEM>>inMemoryDataProvider - InMemoryDataProvider to use, not nullpublic ListBoxListDataView<ITEM> setItems(com.vaadin.flow.data.provider.ListDataProvider<ITEM> listDataProvider)
ListDataView that provides information and allows operations on
the items.setItems in interface com.vaadin.flow.data.provider.HasListDataView<ITEM,ListBoxListDataView<ITEM>>listDataProvider - ListDataProvider providing items to the ListBox.@Deprecated public void setItems(Stream<ITEM> streamOfItems)
HasListDataView.setItems(Collection) instead.public ListBoxListDataView<ITEM> getListDataView()
HasListDataView.setItems(Collection)HasListDataView.setItems(Object[])setItems(ListDataProvider)getListDataView in interface com.vaadin.flow.data.provider.HasListDataView<ITEM,ListBoxListDataView<ITEM>>public ListBoxDataView<ITEM> getGenericDataView()
getListDataView() is not applicable for the
underlying data provider.getGenericDataView in interface com.vaadin.flow.data.provider.HasDataView<ITEM,Void,ListBoxDataView<ITEM>>ListBoxDataViewCopyright © 2021. All rights reserved.