Versions Compared

Key

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

...

  • If the Action is executed in the render phase, it will perform a PortletRequestDispatcher.include(req, res) to the resource specified in the location attribute.
  • If the Action is executed in the event phase, and the result is an action mapping, it will set a render parameter on the ActionResponse to indicate which Action should be executed in the render phase. This follows good web application design, which promotes the use of a redirect after an event, which in this case means that an Action executed in the event phase will be followed by a redirect to an Action executed in the render phase.
  • If the Action is executed in the event phase, and the result is not an action mapping, the result will prepare a special Action called "renderDirect" (specified in the struts-portlet-default package) whose sole purpose is to render the specified web resource (usually a JSP).

redirectAction

The action executed in event mode can pass render parameters to the next action to execute in render mode through parameters using the redirectAction result type:

...

This will set up a render parameter called userId with the value of the userId property of the dispatching actionon the value stack.

You can also use the portletMode parameter to change to a different portlet mode.