Interface DataLoadCoordinator

All Superinterfaces:
Facet
All Known Subinterfaces:
FragmentDataLoadCoordinator, ViewDataLoadCoordinator
All Known Implementing Classes:
AbstractDataLoadCoordinator, FragmentDataLoadCoordinatorImpl, ViewDataLoadCoordinatorImpl

public interface DataLoadCoordinator extends Facet
A non-visual component for coordinating data loading operations in a FacetOwner. Manages the association of data loaders to various triggers, such as view or fragment events, container item changes, or component value changes.
  • Field Details

  • Method Details

    • setContainerPrefix

      void setContainerPrefix(String value)
      Sets parameter prefix to denote a data container.
    • setComponentPrefix

      void setComponentPrefix(String value)
      Sets parameter prefix to denote a visual component.
    • addOnViewEventLoadTrigger

      void addOnViewEventLoadTrigger(DataLoader loader, Class<?> eventClass)
      Adds trigger on view event.
      Parameters:
      loader - loader
      eventClass - event class
    • addOnContainerItemChangedLoadTrigger

      void addOnContainerItemChangedLoadTrigger(DataLoader loader, InstanceContainer<?> container, @Nullable String param)
      Adds trigger on data container ItemChangeEvent.
      Parameters:
      loader - loader
      container - master data container
      param - loader parameter
    • addOnComponentValueChangedLoadTrigger

      void addOnComponentValueChangedLoadTrigger(DataLoader loader, com.vaadin.flow.component.Component component, @Nullable String param, DataLoadCoordinator.LikeClause likeClause)
      Adds trigger on visual component ValueChangeEvent.
      Parameters:
      loader - loader
      component - component which must implement HasValue
      param - loader parameter
      likeClause - whether the condition using the parameter is a LIKE clause
    • configureAutomatically

      void configureAutomatically()
      Configures triggers automatically relying upon parameter prefixes. All data containers that don't have a prefixed parameter in the query string are configured to be triggered on View.BeforeShowEvent in case of View facet owner or Fragment.ReadyEvent in case of Fragment facet owner or AttachEvent.
    • getTriggers

      Returns configured triggers.