[richfaces-issues] [JBoss JIRA] Resolved: (RF-1064) ResourceLifecycle fails to restore UIViewRoot
Alexander Smirnov (JIRA)
jira-events at lists.jboss.org
Thu Oct 4 16:58:03 EDT 2007
[ http://jira.jboss.com/jira/browse/RF-1064?page=all ]
Alexander Smirnov resolved RF-1064.
-----------------------------------
Fix Version/s: 3.1.1
Resolution: Done
I have appended suggested code into resource lifecycle implementation class.
> 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
> 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