org.springframework.webflow.action.portlet
Class SetPortletModeAction

java.lang.Object
  extended by org.springframework.webflow.action.AbstractAction
      extended by org.springframework.webflow.action.portlet.SetPortletModeAction
All Implemented Interfaces:
org.springframework.beans.factory.InitializingBean, Action

public class SetPortletModeAction
extends AbstractAction

Action implementation that changes a PortletResponse mode. The action only generates the AbstractAction.success() event. All error cases result in an exception being thrown.

This class is usefull when you want to change the current PortletMode before entering a specific state, e.g. it can be the first state in a subflow.

Note: if you can, change the PortletMode using Portlet URLs (PortletURL class or portlet TAG).

Author:
J.Enrique Ruiz, Cesar Ordinana, Erwin Vervaet

Field Summary
static java.lang.String PORTLET_MODE_ATTRIBUTE
          The portlet mode to set can be specified in an action state action attribute with this name ("portletMode").
 
Fields inherited from class org.springframework.webflow.action.AbstractAction
logger
 
Constructor Summary
SetPortletModeAction()
           
 
Method Summary
protected  Event doExecute(RequestContext context)
          Sets the PortletMode.
 javax.portlet.PortletMode getPortletMode()
          Returns the mode that will be set in the response.
 void setPortletMode(javax.portlet.PortletMode portletMode)
          Sets the mode that will be set in the response.
 
Methods inherited from class org.springframework.webflow.action.AbstractAction
afterPropertiesSet, doPostExecute, doPreExecute, error, error, execute, getActionNameForLogging, getEventFactorySupport, initAction, no, result, result, result, result, success, success, yes
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PORTLET_MODE_ATTRIBUTE

public static final java.lang.String PORTLET_MODE_ATTRIBUTE
The portlet mode to set can be specified in an action state action attribute with this name ("portletMode").

See Also:
Constant Field Values
Constructor Detail

SetPortletModeAction

public SetPortletModeAction()
Method Detail

getPortletMode

public javax.portlet.PortletMode getPortletMode()
Returns the mode that will be set in the response.


setPortletMode

public void setPortletMode(javax.portlet.PortletMode portletMode)
Sets the mode that will be set in the response.


doExecute

protected Event doExecute(RequestContext context)
                   throws java.lang.Exception
Sets the PortletMode.

Specified by:
doExecute in class AbstractAction
Parameters:
context - the action execution context, for accessing and setting data in "flow scope" or "request scope"
Returns:
the action result event
Throws:
java.lang.Exception - an unrecoverable exception occured, either checked or unchecked


Copyright © 2004-2007. All Rights Reserved.