[richfaces-issues] [JBoss JIRA] Created: (RF-1064) ResourceLifecycle fails to restore UIViewRoot
Stan Silvert (JIRA)
jira-events at lists.jboss.org
Wed Oct 3 21:59:03 EDT 2007
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
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