Home » gridsphere-3.1-src » javax.portlet » [javadoc | source]
javax.portlet
public interface: ActionResponse [javadoc | source]

All Implemented Interfaces:
    PortletResponse

The ActionResponse interface represents the portlet response to an action request. It extends the PortletResponse interface to provide specific action response functionality to portlets.
The portlet container creates an ActionResponse object and passes it as argument to the portlet's processAction method.
Method from javax.portlet.ActionResponse Summary:
sendRedirect,   setPortletMode,   setRenderParameter,   setRenderParameter,   setRenderParameters,   setWindowState
Method from javax.portlet.ActionResponse Detail:
 public  void sendRedirect(String location) throws IOException
    Instructs the portlet container to send a redirect response to the client using the specified redirect location URL.

    This method only accepts an absolute URL (e.g. http://my.co/myportal/mywebap/myfolder/myresource.gif) or a full path URI (e.g. /myportal/mywebap/myfolder/myresource.gif). If required, the portlet container may encode the given URL before the redirection is issued to the client.

    The sendRedirect method can not be invoked after any of the following methods of the ActionResponse interface has been called:

    • setPortletMode
    • setWindowState
    • setRenderParameter
    • setRenderParameters
 public  void setPortletMode(PortletMode portletMode) throws PortletModeException
    Sets the portlet mode of a portlet to the given portlet mode.

    Possible values are the standard portlet modes and any custom portlet modes supported by the portal and the portlet. Portlets must declare in the deployment descriptor the portlet modes they support for each markup type. Standard portlet modes are:

    • EDIT
    • HELP
    • VIEW

    Note: The portlet may still be called in a different window state in the next render call, depending on the portlet container / portal.

 public  void setRenderParameter(String key,
    String value)
    Sets a String parameter for the render request.

    These parameters will be accessible in all sub-sequent render calls via the PortletRequest.getParameter call until a request is targeted to the portlet.

    This method replaces all parameters with the given key.

    The given parameter do not need to be encoded prior to calling this method.

 public  void setRenderParameter(String key,
    String[] values)
    Sets a String array parameter for the render request.

    These parameters will be accessible in all sub-sequent render calls via the PortletRequest.getParameter call until a request is targeted to the portlet.

    This method replaces all parameters with the given key.

    The given parameter do not need to be encoded prior to calling this method.

 public  void setRenderParameters(Map parameters)
    Sets a parameter map for the render request.

    All previously set render parameters are cleared.

    These parameters will be accessible in all sub-sequent render calls via the PortletRequest.getParameter call until a new request is targeted to the portlet.

    The given parameters do not need to be encoded prior to calling this method.

 public  void setWindowState(WindowState windowState) throws WindowStateException
    Sets the window state of a portlet to the given window state.

    Possible values are the standard window states and any custom window states supported by the portal and the portlet. Standard window states are:

    • MINIMIZED
    • NORMAL
    • MAXIMIZED