Skip to content

Implement menu validation based on a string expression #23

@end2endzone

Description

@end2endzone

The system should implement a way to define a a menu validation based on an expression that contains a property, an operator and a expected value.

For instance, ${myproperty}=="true" would validate a <visibility> or <visibility> node only if the value of property myproperty is set to the value true.

The attribute sugested for specifying an expression would be propertyexpression.
For instance:

<visibility propertyexpression="&quot;%{myproperty}&quot; == &quot;&quot;" />

This kind of validation would allow the application to support "exclusive menus". For instance, in a 2 menu scenario, the application would be able to only show one of the two menus at a time.
For instance, the following could be implemented:

  <menu name="A">
    <visibility propertyexpression="&quot;%{next_menu}&quot; == &quot;&quot; || &quot;%{next_menu}&quot; == &quot;A&quot;" />
    <actions>
      <!--Do something meaningful-->
      
      <!--Change the property to only show B.-->
      <property name="next_menu" value="B" />
    </actions>
  </menu>
  <menu name="B">
    <visibility propertyexpression="&quot;%{next_menu}&quot; == &quot;B&quot;" />
    <actions>
      <!--Do something meaningful-->

      <!--Change the property to only show C.-->
      <property name="next_menu" value="C" />
    </actions>
  </menu>
  <menu name="C">
    <visibility propertyexpression="&quot;%{next_menu}&quot; == &quot;C&quot;" />
    <actions>
      <!--Do something meaningful-->

      <!--Change the property to only show A.-->
      <property name="next_menu" value="A" />
    </actions>
  </menu>

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions