The javax.portlet.actionScopedRequestAttributes is the most important container-
runtime option and supporting it is mandatory for Portlet 2.0 containers. It
ensures that the request attributes set in the action request are available to the subsequent
render, resource, and event requests, until a new action request is sent to the
portlet instance
the portlet container in Liferay Portal 5.2.3/6.x allows request attributes set in ActionRequest to be available to the following RenderRequest only, and then they’re gone; it’s a one-time thing.
Also note that the request attributes aren’t available to subsequent render, event, and
resource requests. Subsequent requests aren’t part of the current portlet request.
the other option is setting the request attribute as a render parameter in the ActionResponse
render parameters only allow you to pass String objects and can’t be used for passing complex objects to the following render request. If your container doesn’t support the actionScoped-
RequestAttributes option (as in the case of Jetspeed 2.2), and you need to pass complex
objects to the following render method, you should consider using the PortletSession to hold the attributes.
If your application requirement is to share the request attributes (String type or
complex objects) with subsequent render, event, and resource requests, and your
portlet container doesn’t support the actionScopedRequestAttributes option (as in
the case of Liferay Portal 5.2.3/6.x and Jetspeed 2.2), you should consider storing the
attributes in the PortletSession.
No comments:
Post a Comment