[webbeans-issues] [JBoss JIRA] Commented: (WBRI-258) The conversation needs to be restored in the restore view phase in JSF 2

Dan Allen (JIRA) jira-events at lists.jboss.org
Tue Jun 2 20:07:56 EDT 2009


    [ https://jira.jboss.org/jira/browse/WBRI-258?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12470325#action_12470325 ] 

Dan Allen commented on WBRI-258:
--------------------------------

I don't think so because binding a JSF UI component to a conversation-scoped bean (or session-scoped bean for that matter) is fundamentally incorrect. The UI component must only live for as long as the component tree and by binding it you are causing it to live longer. Since you are doing a direct binding, you can't have something like a current proxy. However, we could certainly have an adapter that produces the component you want.

Anyway, we have been discussing on the mailing lists generalizing conversations to servlets. That would make the problem reported in the issue go away.

> The conversation needs to be restored in the restore view phase in JSF 2
> ------------------------------------------------------------------------
>
>                 Key: WBRI-258
>                 URL: https://jira.jboss.org/jira/browse/WBRI-258
>             Project: Web Beans
>          Issue Type: Bug
>    Affects Versions: 1.0.0.PREVIEW1
>            Reporter: Dan Allen
>            Assignee: Dan Allen
>             Fix For: 1.0.0.PREVIEW2
>
>
> JSF 2 walks the tree in the RestoreView phase, whereas JSF 1 does not. The timing causes a problem if you have a value expression bound to a conversation-scoped bean. The solution is to use a ComponentEventListener to restore the conversation rather than a phase listener. The listener should observe the PostRestoreStateEvent on UIViewRoot. Component listeners can be registered programmatically. WebBeans should detect which version of JSF is in use and act accordingly.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the weld-issues mailing list