action

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

Wiki Markup
{snippet:id=javadoc|javadoc=true|url=org.apache.struts2.components.ActionComponent}

Parameters can be passed to the action using nested param tags.

Placement in context

The action will not be published to the context until the whole tag is evaluated, meaning that inside the body of the tag, the action cannot be accessed, For example:

Code Block

<s:action var="myAction" name="MyAction" namespace="/">
    Is "myAction" null inside the tag? <s:property value="#myAction == null" />
</s:action>
    Is "myAction" null outside the tag? <s:property value="#myAction == null" />

Will print:
Is "myAction" null inside the tag? true
Is "myAction" null outside the tag? false

Parameters

Wiki Markup
{snippet:id=tagattributes|javadoc=false|url=struts2/docs/-tags/ActionComponentaction.html}

Examples

Wiki Markup
{snippet:id=javacode|javadoc=true|lang=java|url=org.apache.struts2.components.ActionComponent}

...