[richfaces-issues] [JBoss JIRA] Assigned: (RF-1064) ResourceLifecycle fails to restore UIViewRoot

Viktor Volkov (JIRA) jira-events at lists.jboss.org
Fri Oct 5 09:44:04 EDT 2007


     [ http://jira.jboss.com/jira/browse/RF-1064?page=all ]

Viktor Volkov reassigned RF-1064:
---------------------------------

    Assignee: Aleksej Yanul

> ResourceLifecycle fails to restore UIViewRoot
> ---------------------------------------------
>
>                 Key: RF-1064
>                 URL: http://jira.jboss.com/jira/browse/RF-1064
>             Project: RichFaces
>          Issue Type: Bug
>    Affects Versions: 3.1.0
>            Reporter: Stan Silvert
>         Assigned To: Aleksej Yanul
>             Fix For: 3.1.1
>
>
> org.ajax4jsf.resource.ResourceLifecycle.send() has this code:
> // create "dummy" viewRoot, to avoid problems in phase listeners.
> UIViewRoot root = new UIViewRoot();
> root.setViewId(resource.getKey());
> root.setLocale(Locale.getDefault());
> root.setRenderKitId(RenderKitFactory.HTML_BASIC_RENDER_KIT);
> facesContext.setViewRoot(root);
> This causes JBoss JSFUnit to fail because the original UIViewRoot is never restored.  JSFUnit saves the FacesContext so that it can be examined by unit tests.  So it needs to be able to see the original component tree.  Can you do something like:
> UIViewRoot savedViewRoot = facesContext.getViewRoot();
> try {
>    // do stuff with your dummy ViewRoot
> } finally {
>   facesContext.setViewRoot(savedViewRoot);
> }
> Thanks,
> Stan Silvert
> JBoss JSFUnit Lead

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

        



More information about the richfaces-issues mailing list