Versions Compared

Key

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

...

Section
Column
width20%
<set>
Column
Assigns a
value to a field
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, constant+expr, expression

optional

A default value - used if from evaluates to null

Expressions must be enclosed in ${}

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

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"


Note
titleDraft Status

Final draft.


...