You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by lu...@apache.org on 2011/05/06 18:10:50 UTC
svn commit: r1100261 -
/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java
Author: lu4242
Date: Fri May 6 16:10:50 2011
New Revision: 1100261
URL: http://svn.apache.org/viewvc?rev=1100261&view=rev
Log:
small fix NullPointerException ViewExpired
Modified:
myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java
Modified: myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java
URL: http://svn.apache.org/viewvc/myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java?rev=1100261&r1=1100260&r2=1100261&view=diff
==============================================================================
--- myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java (original)
+++ myfaces/core/trunk/impl/src/main/java/org/apache/myfaces/application/NavigationHandlerImpl.java Fri May 6 16:10:50 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