Class DataChangeEvent.ItemsAddedEvent<T>

java.lang.Object
java.util.EventObject
com.vaadin.flow.data.provider.DataChangeEvent<T>
com.vaadin.flow.data.provider.DataChangeEvent.ItemsAddedEvent<T>
Type Parameters:
T - the data type
All Implemented Interfaces:
Serializable
Enclosing class:
DataChangeEvent<T>

public static class DataChangeEvent.ItemsAddedEvent<T> extends DataChangeEvent<T>
An event fired when items have been added to a DataProvider, or moved to a new position in it. All other items are unchanged.

A listener that does not need the details can handle this event like any other DataChangeEvent. A listing component uses it to update the item count and the visible items while keeping the state it holds for the unchanged items, such as components rendered for them.

See Also:
  • Constructor Details

    • ItemsAddedEvent

      public ItemsAddedEvent(DataProvider<T,?> source, Collection<T> items)
      Creates a new event originating from the given data provider.
      Parameters:
      source - the data provider, not null
      items - the added items, not null
  • Method Details

    • getItems

      public List<T> getItems()
      Gets the added items.
      Returns:
      an unmodifiable list of the added items, never null