com.opensymphony.webwork.portlet.dispatcher
Class DirectRenderFromEventAction

java.lang.Object
  extended by com.opensymphony.webwork.portlet.dispatcher.DirectRenderFromEventAction
All Implemented Interfaces:
Action

public class DirectRenderFromEventAction
extends Object
implements Action

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.

Author:
Nils-Helge Garli

Field Summary
 
Fields inherited from interface com.opensymphony.xwork.Action
ERROR, INPUT, LOGIN, NONE, SUCCESS
 
Constructor Summary
DirectRenderFromEventAction()
           
 
Method Summary
 String execute()
          Where the logic of the action is executed.
 String getLocation()
          Get the location of the view.
 void setLocation(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
 

Constructor Detail

DirectRenderFromEventAction

public DirectRenderFromEventAction()
Method Detail

getLocation

public String getLocation()
Get the location of the view.

Returns:
Returns the location.

setLocation

public void setLocation(String location)
Set the location of the view.

Parameters:
location - The location to set.

execute

public String execute()
               throws Exception
Description copied from interface: Action
Where the logic of the action is executed.

Specified by:
execute in interface Action
Returns:
a string representing the logical result of the execution. See constants in this interface for a list of standard result values.
Throws:
Exception - thrown if a system level exception occurs. Application level exceptions should be handled by returning an error value, such as Action.ERROR.
See Also:
Action.execute()

WebWork Project Page