Versions Compared

Key

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

...

Section
Column
width20%
<request-to-field>
Column
Copies a Servlet request attribute to a field.
Code Block
xml
xml
<request-to-field field="foo" request-name="fooParameterfooAttribute" />

Attributes

field

optional

The name of the field for the new object

request-name

optional

The name of the request parameter.attribute

default

optional

A default constant value - used if the request attribute does not exist

map-name

optional

The name of the map containing field


Info
titleProposed Changes
  • Currently, the field and request-name attributes are optional. Require both attributes.
  • Eliminate the map-name attribute.
  • Rename the request-name attribute to parameter-name attribute-name - to make the syntax clearer.
  • Rename the default attribute to default-value - to make the syntax similar to other operators.
Section
Column
width20%
<session-to-field>
Column
Copies a Servlet session attribute to a field.
Code Block
xml
xml

<session-to-field field="foo" session-name="fooAttribute" />

Attributes

field

optional

The name of the field for the new object

session-name

optional

The name of the session attribute

default

optional

A default constant value - used if the session attribute does not exist

map-name

optional

The name of the map containing field


Info
titleProposed Changes
  • Currently, the field and session-name attributes are optional. Require both attributes.
  • Eliminate the map-name attribute.
  • Rename the session-name attribute to attribute-name - to make the syntax clearer.
  • Rename the default attribute to default-value - to make the syntax clearer.

...

  • similar to other operators.
Section
Column
width20%
<set>
Column
Assigns a value to a field.
Code Block
xml
xml
<set field="foo" value="bar" />
<set field="baz" from-field="foo" />

Attributes

field

requiredoptional

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

 

from-field

required if value attribute is emptyoptional

The name of a field to copy from (the r-value)

 

value

required if from-field attribute is emptyoptional

A constant value

 

default-value

optional

A default constant value - used if from-field evaluates to null

 

type

optional

The Java data type of field

Defaults to "String"

set-if-null

optional

Controls if field can be set to null.

Defaults to "false"

set-if-empty

optional

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

Defaults to "true"


Info
titleProposed Changes
  • Currently, the field attribute is optional. Require the field attribute.
  • Add a new attribute: from-script. The attribute will be used exclusively for scriptlets that are currently found in other attributes.
  • Rename the from-field attribute to from. The attribute will be used exclusively for UEL expressions.
  • Change the behavior of the value attribute: The attribute will be used exclusively for string constants.
  • Remove the default-value attribute. The value attribute will be used for default constant values.
  • Remove the type attribute default.

...