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 ViewControllerReflectionInspector
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
(ViewControllerReflectionInspector reflectionInspector, QueryParamValuesManager queryParamValuesManager) -
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
addOnViewEventLoadTrigger
(DataLoader loader, Class<?> eventClass) Adds trigger on view event.void
Configures triggers automatically relying upon parameter prefixes.protected void
configureAutomatically
(DataLoader loader, View<?> view) 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 View<?>
Returns configured triggers.protected Stream<DataLoader>
getUnconfiguredLoaders
(ViewData viewData) 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
public DataLoadCoordinatorImpl(ViewControllerReflectionInspector reflectionInspector, QueryParamValuesManager queryParamValuesManager)
-
-
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
-
addOnViewEventLoadTrigger
Description copied from interface:DataLoadCoordinator
Adds trigger on view event.- Specified by:
addOnViewEventLoadTrigger
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
-