Versions Compared

Key

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

...

Section
Column
width20%
<simple-method>
Column
Contains a block of code.
Code Block
xml
xml
<simple-method method-name="myMethodfooMethod">
  <!-- some mini-language code goes here -->
</simple-method>

Attributes

method-name

optional

Each simple method in a file must have a unique name

short-description

optional

Used for documentation

default-error-code

optional

 

default-success-code

optional

 

parameter-map-name

optional

 

event-request-object-name

optional

 

event-session-object-name

optional

 

event-response-object-name

optional

 

event-response-code-name

optional

 

event-error-message-name

optional

 

event-error-message-list-name

optional

 

event-event-message-name

optional

 

event-event-message-list-name

optional

 

service-response-message-name

optional

 

service-error-message-name

optional

 

service-error-message-list-name

optional

 

service-error-message-map-name

optional

 

service-success-message-name

optional

 

service-success-message-list-name

optional

 

login-required

optional

 

use-transaction

optional

 

locale-name

optional

 

delegator-name

optional

 

security-name

optional

 

dispatcher-name

optional

 

user-login-name

optional

 


Info
titleProposed Changes
  • Eliminate unused and seldom used attributes.
  • Currently, the method-name attribute is optional. Require the method-name attribute.

...

Section
Column
width20%
<clear-field>
Column
Removes a field from memory.
Code Block
xml
xml
<clear-field field="foo" />

Attributes

field

optional

The name of the field to remove

map-name

optional

The name of the map to remove


Info
titleProposed Changes
  • Currently, both attributes are the field attribute is optional. Require at least one the field attribute.
  • Eliminate the map-name attribute.
Section
Column
width20%
<create-object>
Column
Create a new Java object.
Code Block
xml
xml
<create-object field="foo" class-name="com.acme.SomeClassFooClass">
  <string value="bar" />
  <field field="foo" />
</create-object>

Attributes

field

optional

The name of the field for the new object

class-name

optional

The Java class name


Child Elements

<field>

optional

<string>

optional


Info
titleProposed Changes
  • Currently, both attributes are optional. Require both attributes.
  • Deprecate and replace with scriptlet

...

Section
Column
width20%
<else-if>
Column
Contains a block of code to be executed when a <condition> element 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>
Column
Contains blocks of code that are executed based on a logical (true/false) condition.
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>

Child Elements

<condition>

optional

<then>

optional

<else>

optional

<else-if>

optional


Info
titleProposed Changes
  • Currently, the <condition> and <then> child elements are optional. Require the <condition> and <then> child elements.
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.
<if-compare-field>
<if-empty>

...