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
|