Uploaded image for project: 'MyFaces Core'
  1. MyFaces Core
  2. MYFACES-3105

Navigation with redirect after ViewExpiredExpcetion throws NPE

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.6-SNAPSHOT
    • 2.0.8, 2.1.2
    • General
    • None
    • myfaces trunk

    Description

      http://www.nfjsone.com/blog/ed_burns/2009/09/dealing_gracefully_with_viewexpiredexception_in_jsf2.

      MYFACES-3101 patch solves that for HTML request.

      For partial/ajax request/response new problems appear: if you try to use redirect like:

      /viewExpired.xhtml?faces-redirect=true

      myfaces throw NPE in org.apache.myfaces.context.servlet.PartialViewContextImpl.getPartialResponseWriter(), because

      _facesContext.getRenderKit() returns null in this case (no view root is available)

      Second easy to fix problem is line facesContext.getViewRoot().getViewId().equals(newViewId) in NavigationHandlerImpl.handleNavigation(FacesContext, String, String) in case of navigationCase.isRedirect().

      Attachments

        Issue Links

          Activity

            People

              lu4242 Leonardo Uribe
              markoc50 Martin Kočí
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: