myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lu4...@apache.org
Subject svn commit: r1100262 - /myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java
Date Fri, 06 May 2011 16:11:03 GMT
Author: lu4242
Date: Fri May  6 16:11:03 2011
New Revision: 1100262

URL: http://svn.apache.org/viewvc?rev=1100262&view=rev
Log:
small fix NullPointerException ViewExpired

Modified:
    myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java

Modified: myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java?rev=1100262&r1=1100261&r2=1100262&view=diff
==============================================================================
--- myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java
(original)
+++ myfaces/core/branches/2.0.x/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java
Fri May  6 16:11:03 2011
@@ -159,11 +159,14 @@ public class NavigationHandlerImpl
                     partialViewContext.setRenderAll(true);
                 }
 
-                if (facesContext.getViewRoot().getAttributes().containsKey("oam.CALL_PRE_DISPOSE_VIEW"))
+                if (facesContext.getViewRoot() != null)
                 {
-                    facesContext.getAttributes().put(SKIP_ITERATION_HINT, Boolean.TRUE);
-                    facesContext.getViewRoot().visitTree(VisitContext.createVisitContext(facesContext),
new PreDisposeViewCallback());
-                    facesContext.getAttributes().remove(SKIP_ITERATION_HINT);
+                    if (facesContext.getViewRoot().getAttributes().containsKey("oam.CALL_PRE_DISPOSE_VIEW"))
+                    {
+                        facesContext.getAttributes().put(SKIP_ITERATION_HINT, Boolean.TRUE);
+                        facesContext.getViewRoot().visitTree(VisitContext.createVisitContext(facesContext),
new PreDisposeViewCallback());
+                        facesContext.getAttributes().remove(SKIP_ITERATION_HINT);
+                    }
                 }
 
                 // create UIViewRoot for new view



Mime
View raw message