Versions Compared

Key

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

The framework provides the ability to chain multiple actions into a defined sequence or workflow. This feature works by applying a Chain Result to a given Action, and intercepting its target Action's invocation with a ChainingInterceptor.

Tip
titleDon't Try This at Home

As a rule, Action Chaining is not recommended. First explore other options, such as the Redirect After Post technique.

Chain Result

The Chain Result is a result type that invokes an Action with its own Interceptor Stack and Result. This Interceptor allows an Action to forward requests to a target Action, while propagating the state of the source Action. Below is an example of how to define this sequence.

...

Another action mapping in the same namespace (or the default "" namespace) can be executed after this action mapping (see Configuration Files). An optional "namespace" parameter may also be added to specify an action in a different namespace.

...

One common use of Action chaining is to provide lookup lists (like for a dropdown list of states). Since these Actions get put on the ValueStack, their properties will be available in the view. This functionality can also be done using the ActionTag to execute an Action from the display page. You may also use the Redirect Action Result to accomplish this.

Next: ActionMapper