[jboss-cvs] jboss-seam/src/main/org/jboss/seam/contexts ...
Gavin King
gavin.king at jboss.com
Thu Oct 19 18:50:44 EDT 2006
User: gavin
Date: 06/10/19 18:50:44
Modified: src/main/org/jboss/seam/contexts PageContext.java
Log:
fix
Revision Changes Path
1.9 +5 -2 jboss-seam/src/main/org/jboss/seam/contexts/PageContext.java
(In the diff below, changes in quantity of whitespace are not shown.)
Index: PageContext.java
===================================================================
RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/contexts/PageContext.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- PageContext.java 16 Oct 2006 15:46:43 -0000 1.8
+++ PageContext.java 19 Oct 2006 22:50:44 -0000 1.9
@@ -6,9 +6,11 @@
*/
package org.jboss.seam.contexts;
+import java.util.Collections;
import java.util.HashMap;
import java.util.Map;
+import javax.faces.component.UIViewRoot;
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseId;
@@ -29,7 +31,7 @@
* returns values from the page that was the source of the request.
*
* @author Gavin King
- * @version $Revision: 1.8 $
+ * @version $Revision: 1.9 $
*/
public class PageContext implements Context {
@@ -125,7 +127,8 @@
{
throw new IllegalStateException("no FacesContext bound to current thread");
}
- return facesContext.getViewRoot().getAttributes();
+ UIViewRoot viewRoot = facesContext.getViewRoot();
+ return viewRoot==null ? Collections.EMPTY_MAP : viewRoot.getAttributes();
}
private static PhaseId getPhaseId()
More information about the jboss-cvs-commits
mailing list