myfaces-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael Lipp (JIRA)" <>
Subject [jira] Commented: (MYFACES-788) Request attributes lost when using MyFaces in Portlet
Date Thu, 14 Sep 2006 07:25:25 GMT
    [ ] 
Michael Lipp commented on MYFACES-788:

I'm not sure, because it is quite some time that I fixed this, but looking at my portlet bridge
again (
I think things are a bit more complicated.

The problem arises from more than one instance of a (MyFaces) portlet being on the same page.
The action request is intended for one portlet (instance) only, but simply modifying the request
attributes causes them to be applied to all portlet instances.

So what I do is save the request attributes, call lifecycle.execute, get all new request attributes
that may have been added during lifecycle.execute, save them in the portlet session and remove
them from the request, thus restoring it to its initial set of values. Before lifecycle.render,
I re-add the attributes saved in the portlet session, thus ensuring that only the portlet
that executed the action "sees" the attributes that it added during the action. And ensuring
that is has these attributes always available even if lifecycle.render is called several times
after lifecycle.execute (as is usual in portals).

> Request attributes lost when using MyFaces in Portlet
> -----------------------------------------------------
>                 Key: MYFACES-788
>                 URL:
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 1.1.0
>            Reporter: Michael Lipp
>         Attachments:
> Request attributes set in Phases prior to the rendering phase are no longer available
in the rendering phase. This behaviour is easily explainable from a portlet writer's point
of view (he knows about the distinction between the ActionRequest and the RenderRequest).
From the JSF implementor's point of view (who knows only about a single request) this behaviour
leads -- during the rendering phase -- to the unexplicable unavailability of all request attributes
set prior to the rendering phase.
> Looking through the JSF spec, I found no indication that request scope attributes may
be lost during the processing of a (from the JSF user's point of view) single request. So
I thing the portlet JSF bridge should ensure the "carrying over" of request attributes between
the action and the render request.

This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see:


View raw message