Package io.jmix.flowui.facet.impl
Class DataLoadCoordinatorImpl
java.lang.Object
io.jmix.flowui.facet.impl.AbstractFacet
io.jmix.flowui.facet.impl.DataLoadCoordinatorImpl
- All Implemented Interfaces:
DataLoadCoordinator
,Facet
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.jmix.flowui.facet.DataLoadCoordinator
DataLoadCoordinator.LikeClause, DataLoadCoordinator.Trigger
-
Field Summary
Modifier and TypeFieldDescriptionprotected String
protected String
protected static final Pattern
protected UiControllerReflectionInspector
protected List<DataLoadCoordinator.Trigger>
Fields inherited from class io.jmix.flowui.facet.impl.AbstractFacet
id, owner
Fields inherited from interface io.jmix.flowui.facet.DataLoadCoordinator
DEFAULT_COMPONENT_PREFIX, DEFAULT_CONTAINER_PREFIX, NAME
-
Constructor Summary
ConstructorDescriptionDataLoadCoordinatorImpl
(UiControllerReflectionInspector reflectionInspector) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addOnComponentValueChangedLoadTrigger
(DataLoader loader, com.vaadin.flow.component.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
addOnScreenEventLoadTrigger
(DataLoader loader, Class<?> eventClass) Adds trigger on screen/fragment event.void
Configures triggers automatically relying upon parameter prefixes.protected void
configureAutomatically
(DataLoader loader, Screen<?> screen) protected boolean
containsLikeClause
(Condition condition, String parameter) protected boolean
containsLikeClause
(String query, String parameter) protected DataLoadCoordinator.LikeClause
findLikeClause
(DataLoader loader, String parameter) protected String
findSingleParam
(DataLoader loader) getConditionParameters
(DataLoader loader) protected Screen<?>
Returns configured triggers.protected Stream<DataLoader>
getUnconfiguredLoaders
(ScreenData screenData) protected boolean
loaderIsNotConfiguredYet
(DataLoader loader) void
setComponentPrefix
(String value) Sets parameter prefix to denote a visual component.void
setContainerPrefix
(String value) Sets parameter prefix to denote a data container.Methods inherited from class io.jmix.flowui.facet.impl.AbstractFacet
getId, getOwner, setId, setOwner
-
Field Details
-
LIKE_PATTERN
-
containerPrefix
-
componentPrefix
-
triggers
-
reflectionInspector
-
-
Constructor Details
-
DataLoadCoordinatorImpl
-
-
Method Details
-
setContainerPrefix
Description copied from interface:DataLoadCoordinator
Sets parameter prefix to denote a data container.- Specified by:
setContainerPrefix
in interfaceDataLoadCoordinator
-
setComponentPrefix
Description copied from interface:DataLoadCoordinator
Sets parameter prefix to denote a visual component.- Specified by:
setComponentPrefix
in interfaceDataLoadCoordinator
-
getTriggers
Description copied from interface:DataLoadCoordinator
Returns configured triggers.- Specified by:
getTriggers
in interfaceDataLoadCoordinator
-
addOnScreenEventLoadTrigger
Description copied from interface:DataLoadCoordinator
Adds trigger on screen/fragment event.- Specified by:
addOnScreenEventLoadTrigger
in interfaceDataLoadCoordinator
- Parameters:
loader
- loadereventClass
- event class
-
addOnContainerItemChangedLoadTrigger
public void addOnContainerItemChangedLoadTrigger(DataLoader loader, InstanceContainer<?> container, @Nullable String param) Description copied from interface:DataLoadCoordinator
Adds trigger on data containerItemChangeEvent
.- Specified by:
addOnContainerItemChangedLoadTrigger
in interfaceDataLoadCoordinator
- Parameters:
loader
- loadercontainer
- master data containerparam
- loader parameter
-
addOnComponentValueChangedLoadTrigger
public void addOnComponentValueChangedLoadTrigger(DataLoader loader, com.vaadin.flow.component.Component component, @Nullable String param, DataLoadCoordinator.LikeClause likeClause) Description copied from interface:DataLoadCoordinator
Adds trigger on visual componentValueChangeEvent
.- Specified by:
addOnComponentValueChangedLoadTrigger
in interfaceDataLoadCoordinator
- Parameters:
loader
- loadercomponent
- component which must implementHasValue
param
- loader parameterlikeClause
- whether the condition using the parameter is a LIKE clause
-
configureAutomatically
public void configureAutomatically()Description copied from interface:DataLoadCoordinator
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
.- Specified by:
configureAutomatically
in interfaceDataLoadCoordinator
-
getUnconfiguredLoaders
-
loaderIsNotConfiguredYet
-
configureAutomatically
-
containsLikeClause
-
getConditionParameters
-
findSingleParam
-
findLikeClause
-
containsLikeClause
-
getOwnerNN
-