[seam-issues] [JBoss JIRA] (JBSEAM-4898) JSF2 Page Scope components are not active on postback

Marek Novotny (JIRA) jira-events at lists.jboss.org
Wed Mar 21 18:27:47 EDT 2012

    [ https://issues.jboss.org/browse/JBSEAM-4898?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12678494#comment-12678494 ] 

Marek Novotny commented on JBSEAM-4898:

This whole issue is about correct initialization of PageContext and ConversationContext while RestoreView phase is processed. If the context initialization is moved from afterRestoreView to beforeRestoreView, a conversation is not correctly stored especially in case of nested conversation or long running conversation. The postback request is also affected. The whole point is that ViewMap, where are conversation ids stored is not always available in case of beforeRestoreView processing, ViewMap is initialized directly in RESTORE_VIEW.

I have tried to use PostConstructViewMapEvent to start initialization of conversation and the contexts, bu this event certainly is not fired in Postback request, where it is recycled from previous UIViewRoot.

I saw similar issues in WELD like WELD-157 or WELD-100.

> JSF2 Page Scope components are not active on postback
> -----------------------------------------------------
>                 Key: JBSEAM-4898
>                 URL: https://issues.jboss.org/browse/JBSEAM-4898
>             Project: Seam 2
>          Issue Type: Bug
>    Affects Versions: 2.3.0.ALPHA
>            Reporter: John Gilbert
>            Assignee: Marek Novotny
>            Priority: Blocker
>             Fix For: 2.3.0.BETA1
>         Attachments: JBSEAM-4898-patch.txt, seam-scope-test-master.zip
> Page scoped components are not active on postback during the restore view phase. We have been doing things like this in JSF 1.2 for years with no trouble.
> {code}
> <ui:include src="#{pageScopedComponent.viewId}" />
> {code}
> In JSF 2 the page will render, because the facelet isn't actually complied until the render phase on a GET. Then on postback the component is not found in the stateful page scope and then isn't created because the page scope is not active yet.
> I have made many attempts to debug this but I have run out of ideas. I'm thinking this is a bug so I am posting it here. But if someone can give me some fresh ideas on where to look, I will keep digging.

This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira


More information about the seam-issues mailing list