You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Matthew Bond (JIRA)" <de...@myfaces.apache.org> on 2006/02/01 16:14:05 UTC

[jira] Commented: (MYFACES-788) Request attributes lost when using MyFaces in Portlet

    [ http://issues.apache.org/jira/browse/MYFACES-788?page=comments#action_12364813 ] 

Matthew Bond commented on MYFACES-788:
--------------------------------------

I also have this problem. Using JetSpeed 2.0 & MyFaces 1.1.1. It is not only a problem when using the JSF bridge but as in our case also when using the MyFacesGenericPortlet. During the Action Phase we set a request scope managed bean.

    ValueBinding binding = ctx.getApplication().createValueBinding("#{editContact}");
    binding.setValue(ctx, editContact);  

Then during the render phase we try to retrieve the value of this managed bean, but because the request variables set in the ActionRequest are not available in the RenderRequest a new editContact is instanciated.

            <h:inputText disabled="true" value="#{editContact.contactId}" id="idText" rendered="#{editContact.notNew}"/>

If I change the Managed Bean definition from request scope to session scope the app works, but this is not really how it should be.

> Request attributes lost when using MyFaces in Portlet
> -----------------------------------------------------
>
>          Key: MYFACES-788
>          URL: http://issues.apache.org/jira/browse/MYFACES-788
>      Project: MyFaces
>         Type: Bug
>     Versions: 1.1.0
>     Reporter: Michael Lipp

>
> 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:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira