Package io.jmix.flowui.data
Interface EntityItems<E>
- Type Parameters:
E- the type of entity items in the collection
- All Superinterfaces:
DataUnit,EntityDataUnit
- All Known Implementing Classes:
ContainerDataProvider
Represents a data unit bound to a collection of entity items. Provides capabilities
for managing the collection and interacting with its state and events.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classEvent that is fired then item collection is changed.Nested classes/interfaces inherited from interface io.jmix.flowui.data.DataUnit
DataUnit.StateChangeEvent -
Method Summary
Modifier and TypeMethodDescriptioncom.vaadin.flow.shared.RegistrationaddItemsChangeListener(Consumer<EntityItems.ItemsChangeEvent<E>> listener) Adds an items change listener.booleancontainsItem(@Nullable E item) voidrefresh()Refreshes the source moving it to theBindingState.ACTIVEstatevoidsetSelectedItem(@Nullable E item) Set current item in the source.voidupdateItem(E item) Update an item in the collection if it is already there.Methods inherited from interface io.jmix.flowui.data.DataUnit
addStateChangeListener, getStateMethods inherited from interface io.jmix.flowui.data.EntityDataUnit
getEntityMetaClass
-
Method Details
-
setSelectedItem
Set current item in the source.- Parameters:
item- the item to set
-
containsItem
- Returns:
- true if the underlying collection contains an item with the specified ID
-
updateItem
Update an item in the collection if it is already there. -
refresh
void refresh()Refreshes the source moving it to theBindingState.ACTIVEstate -
addItemsChangeListener
com.vaadin.flow.shared.Registration addItemsChangeListener(Consumer<EntityItems.ItemsChangeEvent<E>> listener) Adds an items change listener. The listener is called when the item collection is changed.- Parameters:
listener- a listener to register, not null- Returns:
- a registration for the listener
-