Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Section
Column
width20%
<else>
Column
Contains a block of code to be executed when a
<condition> element
condition evaluates to false.
Code Block
xml
xml
<if>
    <condition>
        <and>
            <if-compare field="colorModel" operator="equals" value="RYB" />
            <or>
                <if-compare field="color" operator="equals" value="red" />
                <if-compare field="color" operator="equals" value="yellow" />
                <if-compare field="color" operator="equals" value="blue" />
            </or>
        </and>
    </condition>
    <then>
        <set field="isPrimaryColor" value="true" type="Boolean" />
    </then>
    <else>
        <set field="isPrimaryColor" value="false" type="Boolean" />
    </else>
</if>
Section
Column
width20%
<else-if>
Column
Contains a block of code to be executed when a
<condition> element
condition evaluates to false.
Code Block
xml
xml
<if>
    <condition>
        <and>
            <if-compare field="colorModel" operator="equals" value="RYB" />
            <or>
                <if-compare field="color" operator="equals" value="red" />
                <if-compare field="color" operator="equals" value="yellow" />
                <if-compare field="color" operator="equals" value="blue" />
            </or>
        </and>
    </condition>
    <then>
        <set field="isPrimaryColor" value="true" type="Boolean" />
    </then>
    <else-if>
        <condition>
            <and>
                <if-compare field="colorModel" operator="equals" value="CYM" />
                <or>
                    <if-compare field="color" operator="equals" value="cyan" />
                    <if-compare field="color" operator="equals" value="yellow" />
                    <if-compare field="color" operator="equals" value="magenta" />
                </or>
            </and>
        </condition>
        <then>
            <set field="isPrimaryColor" value="true" type="Boolean" />
        </then>
    </else-if>
    <else>
        <set field="isPrimaryColor" value="false" type="Boolean" />
    </else>
</if>

...

Section
Column
width20%
<if-compare>
Column
Compares a field to a constant value.

Attributes

field

optional

The name of the field to test

 

operator

optional

The comparison operator

 

value

optional

A constant value

 

type

optional

The Java data type of field

Defaults to "String"

format

optional

Object type conversion format

 

map-name

optional

The name of the map containing field

 


Info
titleProposed Changes
  • Currently, the field and operator attributes are optional. Require the field and operator attributes.
  • Eliminate the map-name attribute.

...

Section
Column
width20%
<if-compare-field>
Column
Compares a field to another field.

Attributes

field

optional

The name of the field to test (the l-value)

 

operator

optional

The comparison operator

 

to-field

optional

The name of the field to test (the r-value)

Defaults to field

type

optional

The Java data type of field

Defaults to "String"

format

optional

Object type conversion format

 

map-name

optional

The name of the map containing field

 

to-map-name

optional

The name of the map containing to-field

 


Info
titleProposed Changes
  • Currently, the field, operator, and to-field attributes are optional. Require the field, operator and to-field attributes.
  • Eliminate the map-name and to-map-name attributes.
Section
Column
width20%
<if-empty>
Column
Contains blocks of code that are executed based on the size of a collection.

Attributes

field

optional

The name of the field to test

map-name

optional

The name of the map containing field


Child Elements

<else>

optional


Info
titleProposed Changes
  • Currently, the field attribute is optional. Require the field attribute.
  • Eliminate the map-name attribute.
<if-has-permission>
Section
Column
width20%
<if-has-permission>
Column
Contains blocks of code that are executed based on the user's permissions.

Attributes

permission

optional

The permission to check

 

action

optional

The action to be performed (permission scope)

 


Child Elements

<else>

optional


Info
titleProposed Changes
  • Currently, the permission and action attributes are optional. Require the permission and action attributes.
<if-instance-of>
<if-not-empty>

...