Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 4.0

...

The Action instance is always pushed onto the value stack. Because the Action is on the stack, and the stack is the OGNL root, references to Action properties can omit the # marker. But, to access other objects in the ActionContext, we must use the # notation so OGNL knows not to look in the root object, but for some other object in the ActionContext.

Code Block
xmlxml
titleReferencing an Action property
xml
<s:property value="postalCode"/>

Other (non-root) objects in the ActionContext can be rendered use the # notation.

xml
Code Block
xml
1title:Reference Another Object in the ActionContext
xml
<s:property value="#session.mySessionPropKey"/> or
<s:property value="#session['mySessionPropKey']"/> or
<s:property value="#request['myRequestPropKey']"/>

...

To select a subset of a collection (called projection), use a wildcard within the collection.

  • ? - All elements matching the selection logic
  • ^ - Only the first element matching the selection logic
  • $ - Only the last element matching the selection logic

To obtain a subset of just male relatives from the object person:

...