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

          People

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

            Dates

            • Created:
              Updated:
              Resolved: