Type to start searching...

Switch

Properties
value : string

Switch value view path followed by an optional association path used to drive polymorphic display.

The expression part of a polymorphic layout switch. This is conceptually similar to a JAVA switch, but for UI. The value property contains the expression that the cases are evaluated against. If this resolves to a non-primitive, the cases are compared against the non-primitive's class type. Note: The class, all subclasses, and the 'null' case should be handled. If this resolves to a primitive, the cases are compared directly with the value. Note: All possible values and the 'null' case should be handled. That being said Enumerated values and booleans are most appropriate.

Within the Switch the cases are checked from left to right. The first Layout to match will be the one to display. If the Switch is on a layout and the value is (@), the association is defaulted to the current instance of the layouts's underlying model.

Example


See the Switch case property for an example.

Content
  • Sequence of:

    • Case [0..*] - Polymorphic value switch

Parents