Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Adds "locale " attribute to set operation

...

Section
Column
width20%
<set>
Column
Assigns a field from an expression or script, or from a constant value.
Code Block
xml
xml
<set field="foo" value="bar" />
<set field="baz" from="foo" />
<!-- Field "baz" contains the string "bar" -->
Attributes

Name

Type

Requirements

Description

Notes

field

expression

required

The name of the field to set, the target of the assignment.

 

from

expression, script

required if value is empty

An expression or script that returns an object or null.

The script must be prefixed with the script language followed by a colon (":").

value

constant+expr

required if from is empty

A constant value.

Default type = "java.lang.String".

default

constant, ${expression}

optional

A default value that is used when the from attribute evaluates to null or empty.

 

type

constant

optional

The Java data type of field.

"NewList" will create a new java.util.List, "NewMap" will create a new java.util.Map. Otherwise, the attribute must contain a valid Java class name.

locale

constant, ${expression}

optional

If a locale dependent type is passed allows to i18n the value.

Defaults to environment locale.

set-if-null

constant

optional

Controls if field can be set to null.

Defaults to "false".

set-if-empty

constant

optional

Controls if field can be set to an empty value. The meaning of "empty" depends on the Java data type.

Defaults to "true".

...