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="fooAttribute" />

Attributes

field

optional

The name of the field for the new object

request-name

optional

The name of the request 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 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 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

optional

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

 

from-field

optional

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

 

value

optional

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.
  • Currently, the from-field and value attributes are optional. Require one of the two attributes.
  • 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.

...

Section
Column
width20%
<to-string>
Column
Info
titleProposed Changes

Deprecate and replace with UEL expression or <set>

Section
Column
width20%
<webapp-property-to-field>
Column
Copies a ServletContext resource property to a field.
Code Block
xml
xml

<webapp-property-to-field field="foo" resource="fooResource" property="fooKey" />

Attributes

field

optional

The name of the field for the new object

resource

optional

The resource that contains the property

property

optional

The property key

default

optional

A default value to be used when the property is not found

map-name

optional

The name of the map containing field


Info
titleProposed Changes
  • Currently, the field, resource and property attributes are optional. Require all three attributes.
  • Eliminate the map-name attribute.


Conditional/Looping Statements

...