Package io.jmix.ui.component
Interface DataLoadCoordinator
- All Superinterfaces:
Facet
- All Known Implementing Classes:
DataLoadCoordinatorImpl
@StudioFacet(xmlElement="dataLoadCoordinator",
caption="DataLoadCoordinator",
category="Facets",
description="Controls triggering of data loaders and provides support for automatic linking data loaders to data containers and visual components",
defaultProperty="id",
documentationURL="https://docs.jmix.io/jmix/%VERSION%/ui/facets/data-load-coordinator.html",
icon="io/jmix/ui/icon/facet/dataLoadCoordinator.svg")
public interface DataLoadCoordinator
extends Facet
Controls triggering of data loaders and provides support for automatic linking data loaders to data containers
and visual components.
-
Nested Class Summary
Modifier and TypeInterfaceDescriptionstatic enum
Type of the LIKE clause.static interface
Load trigger. -
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addOnComponentValueChangedLoadTrigger
(DataLoader loader, Component component, String param, DataLoadCoordinator.LikeClause likeClause) Adds trigger on visual componentValueChangeEvent
.void
addOnContainerItemChangedLoadTrigger
(DataLoader loader, InstanceContainer container, String param) Adds trigger on data containerItemChangeEvent
.void
addOnFrameOwnerEventLoadTrigger
(DataLoader loader, Class eventClass) Adds trigger on screen/fragment event.void
Configures triggers automatically relying upon parameter prefixes.Returns configured triggers.void
setComponentPrefix
(String value) Sets parameter prefix to denote a visual component.void
setContainerPrefix
(String value) Sets parameter prefix to denote a data container.
-
Field Details
-
DEFAULT_CONTAINER_PREFIX
- See Also:
-
DEFAULT_COMPONENT_PREFIX
- See Also:
-
-
Method Details
-
setContainerPrefix
@StudioProperty(name="containerPrefix", defaultValue="container_") void setContainerPrefix(String value) Sets parameter prefix to denote a data container. -
setComponentPrefix
@StudioProperty(name="componentPrefix", defaultValue="component_") void setComponentPrefix(String value) Sets parameter prefix to denote a visual component. -
addOnFrameOwnerEventLoadTrigger
Adds trigger on screen/fragment event.- Parameters:
loader
- loadereventClass
- event class
-
addOnContainerItemChangedLoadTrigger
void addOnContainerItemChangedLoadTrigger(DataLoader loader, InstanceContainer container, @Nullable String param) Adds trigger on data containerItemChangeEvent
.- Parameters:
loader
- loadercontainer
- master data containerparam
- loader parameter
-
addOnComponentValueChangedLoadTrigger
void addOnComponentValueChangedLoadTrigger(DataLoader loader, Component component, @Nullable String param, DataLoadCoordinator.LikeClause likeClause) Adds trigger on visual componentValueChangeEvent
.- Parameters:
loader
- loadercomponent
- component which must implementHasValue
param
- loader parameterlikeClause
- whether the condition using the parameter is a LIKE clause
-
configureAutomatically
@StudioProperty(name="auto", type=BOOLEAN, defaultValue="false", initialValue="true") 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 onBeforeShowEvent
orAttachEvent
. -
getTriggers
@StudioElementsGroup(caption="Refresh", xmlElement="refresh", icon="io/jmix/ui/icon/facet/refresh.svg", maxOccurs=UNBOUNDED) List<DataLoadCoordinator.Trigger> getTriggers()Returns configured triggers.
-