Open
Description
As a DepndsOn Plugin consumer, I want to be able to combine multiple actions per one query condition.
According to the previous enhancements:
- DependsOn now supports actor-based conflict resolution for ottb actions (e.g.
disable
multiple DependsOn or outside actors can request action) - DependsOn is going to support the whole list of default actions with their inversed versions
It is proposed to make the following changes in DependsOn API:
- Java API: ability to declare multiple actions per one query
@DependsOn(query = "@condition", action = {DependsOnActions.SHOW, DependsOnActions.ENABLE})
public String field;
Considering as an alias for
@DependsOn(query = "@condition", action = DependsOnActions.SHOW)
@DependsOn(query = "@condition", action = DependsOnActions.ENABLE)
public String field;
Note:
- XML | HTML API:
<someField >
<granite:data
dependsOn="@condition"
dependsOnAction="SHOW"
dependsOn1="@condition"
dependsOnAction1="DISABLE"
dependsOn2="@condition"
dependsOnAction2="DISABLE"
/>
</someFIreld>
Note: according to soft support reasons, there are also no breaking changes expected here
The current combined syntax is still supported for the unnumbered dependsOn declaration:
<someField >
<granite:data
dependsOn="@condition;@condition"
dependsOnAction="SHOW;ENABLE"
/>
</someFIreld>
- JS API Behaviour
The optimization to manage the same condition (DOn) query for multiple actions is expected to be handled by the DOn parsing algorithms.
TDB: discuss if that is reasonable...