org.apache.struts2.portlet.dispatcher
Class DirectRenderFromEventAction
java.lang.Object
org.apache.struts2.portlet.dispatcher.DirectRenderFromEventAction
- All Implemented Interfaces:
- com.opensymphony.xwork2.Action, java.io.Serializable
public class DirectRenderFromEventAction
- extends java.lang.Object
- implements com.opensymphony.xwork2.Action, java.io.Serializable
When a portlet is targetted for an event
, the portlet will receive two
portlet requests, one for the event
phase, and then followed by a render
operation. When in the event
phase, the action that is executed can't render
any output. This means that if an action in the XWork configuration is executed in the event
phase, and the action is set up with a result that should render something, the result can't
immediately be executed. The portlet needs to "wait" to the render phase to do the
rendering.
When the PortletResult
detects such a
scenario, instead of executing the actual view, it prepares a couple of render parameters
specifying this action and the location of the view, which then will be executed in the
following render request.
- See Also:
- Serialized Form
Fields inherited from interface com.opensymphony.xwork2.Action |
ERROR, INPUT, LOGIN, NONE, SUCCESS |
Method Summary |
java.lang.String |
execute()
Always return success. |
java.lang.String |
getLocation()
Get the location of the view. |
void |
setLocation(java.lang.String location)
Set the location of the view. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DirectRenderFromEventAction
public DirectRenderFromEventAction()
getLocation
public java.lang.String getLocation()
- Get the location of the view.
- Returns:
- Returns the location.
setLocation
public void setLocation(java.lang.String location)
- Set the location of the view.
- Parameters:
location
- The location to set.
execute
public java.lang.String execute()
throws java.lang.Exception
- Always return success.
- Specified by:
execute
in interface com.opensymphony.xwork2.Action
- Returns:
- SUCCESS
- Throws:
java.lang.Exception
Copyright © 2000-2006 Apache Software Foundation. All Rights Reserved.