ICEfaces
  1. ICEfaces
  2. ICE-4251

Lifecycle needs to be running before doing navigation/redirection in PersistentFacesState

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.8RC2
    • Fix Version/s: 1.8
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEFaces + any external code trying to do navigation using API exposed by PersistentFacesState for navigation/redirection
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      Client reports success with this workaround:

      public static void checkViewRoot(PersistentFacesState state, String viewId) {
               FacesContext ctx = state.getFacesContext();
               if (ctx.getViewRoot() == null) {
                   UIViewRoot viewRoot = ctx.getApplication().getViewHandler().createView(ctx, viewId);
                   if (viewRoot != null) {
                       ctx.setViewRoot(viewRoot);
                   }
               }
           }


      There may be future problems with this as a full JSF lifecycle is not running.
      Show
      Client reports success with this workaround: public static void checkViewRoot(PersistentFacesState state, String viewId) {          FacesContext ctx = state.getFacesContext();          if (ctx.getViewRoot() == null) {              UIViewRoot viewRoot = ctx.getApplication().getViewHandler().createView(ctx, viewId);              if (viewRoot != null) {                  ctx.setViewRoot(viewRoot);              }          }      } There may be future problems with this as a full JSF lifecycle is not running.

      Description

      Client has a long running process trying to do navigation. With the introduction of StateSaving, the ViewRoot is no longer maintained between user requests.

      The PersistentFacesState class has been modified to keep a reference to the information required to start a JSF lifecycle. This is necessary for all server push operations but in this case, the navigateTo and redirectTo methods don't start a JSF lifecycle and the client hasn't the means to start one in the long running thread hence the ViewRoot reference will be null.

        Activity

        Repository Revision Date User Message
        ICEsoft Public SVN Repository #18659 Wed Mar 25 16:56:44 MDT 2009 greg.dick ICE-4251 Changed the lifecycle existence check to reflect customer issues.
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java
        Repository Revision Date User Message
        ICEsoft Public SVN Repository #18635 Mon Mar 23 15:20:33 MDT 2009 greg.dick ICE-4251 Start a JSF lifecycle if necessary around navigateTo method contents
        Files Changed
        Commit graph MODIFY /icefaces/trunk/icefaces/core/src/com/icesoft/faces/webapp/xmlhttp/PersistentFacesState.java

          People

          • Assignee:
            Unassigned
            Reporter:
            Greg Dick
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: