Skip to content

[EAK-473] DependsOn: ability to pass multiple actions per query (POC) #473

Open
@ala-n

Description

@ala-n

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:

  1. 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: ⚠️no breaking changes for current API (default action = DependsOnActions.VISIBILITY)

  1. 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>
  1. 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...

Metadata

Metadata

Labels

DependsOnDependsOn-related logic

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions