FileDocCategorySizeDatePackage
DirectRenderFromEventAction.javaAPI DocExample2661Mon Jul 23 13:26:38 BST 2007org.apache.struts2.portlet.dispatcher

DirectRenderFromEventAction

public class DirectRenderFromEventAction extends Object implements com.opensymphony.xwork2.Action, 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 {@link org.apache.struts2.portlet.result.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.

Fields Summary
private static final long
serialVersionUID
private String
location
Constructors Summary
Methods Summary
public java.lang.Stringexecute()
Always return success.

return
SUCCESS

        return SUCCESS;
    
public java.lang.StringgetLocation()
Get the location of the view.

return
Returns the location.


                   
       
        return location;
    
public voidsetLocation(java.lang.String location)
Set the location of the view.

param
location The location to set.

        this.location = location;