Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.1
    • Fix Version/s: 3.1.0.BETA1, 3.1
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces
    • Assignee Priority:
      P1
    • Affects:
      Documentation (User Guide, Ref. Guide, etc.)

      Description


      PersistentFaces.State.redirectTo() allows a redirect to be pushed to the browser, but ICEfaces 2.0 PushRenderer does not provide this feature.

        Activity

        Hide
        Ted Goddard added a comment -

        It should be possible to implement this with no bridge, core, or ICEpush modifications:

        On pages that support redirection:

        <ice:redirect href="#

        {bean.redirectLocation}

        " />

        If href is not null or empty, the redirect component adds an exec navigator.location=href to the partial response and invokes responseComplete(). This can be used when invoked via push or via a user interaction.

        The "trick" in using this technique is to store the href so that it is accessible during rendering. Since a typical use case would be to trigger a redirect in one session from another, the method required would be to store the href in the application database, then invoke PushRenderer.render(). Another common case would be a redirect triggered via push after a long-running process. In that case, the completion of the long-running process can set the href and store it along with the completion status of the process.

        Show
        Ted Goddard added a comment - It should be possible to implement this with no bridge, core, or ICEpush modifications: On pages that support redirection: <ice:redirect href="# {bean.redirectLocation} " /> If href is not null or empty, the redirect component adds an exec navigator.location=href to the partial response and invokes responseComplete(). This can be used when invoked via push or via a user interaction. The "trick" in using this technique is to store the href so that it is accessible during rendering. Since a typical use case would be to trigger a redirect in one session from another, the method required would be to store the href in the application database, then invoke PushRenderer.render(). Another common case would be a redirect triggered via push after a long-running process. In that case, the completion of the long-running process can set the href and store it along with the completion status of the process.
        Hide
        Ted Goddard added a comment -

        There are essentially three alternatives an additional API on PushRenderer: redirection to a JSF viewID, a JSF navigation "outcome", or a URL (potentially all of these should be supported).

        Show
        Ted Goddard added a comment - There are essentially three alternatives an additional API on PushRenderer: redirection to a JSF viewID, a JSF navigation "outcome", or a URL (potentially all of these should be supported).
        Hide
        Ted Goddard added a comment -

        Modifying the PushRenderer API is not a good approach; this should be implemented as in the first comment at the page level. The page-level approach is better because: it avoids divergence between ICEfaces and ICEpush APIs and it allows each page to determine a potentially different redirect location.

        Show
        Ted Goddard added a comment - Modifying the PushRenderer API is not a good approach; this should be implemented as in the first comment at the page level. The page-level approach is better because: it avoids divergence between ICEfaces and ICEpush APIs and it allows each page to determine a potentially different redirect location.
        Hide
        Jack Van Ooststroom added a comment -

        Adding src/main/java/org/icefaces/impl/component/Redirect.java
        Sending src/main/resources/META-INF/core.taglib.xml
        Sending src/main/resources/META-INF/faces-config.xml
        Transmitting file data ...
        Committed revision 29058.

        Show
        Jack Van Ooststroom added a comment - Adding src/main/java/org/icefaces/impl/component/Redirect.java Sending src/main/resources/META-INF/core.taglib.xml Sending src/main/resources/META-INF/faces-config.xml Transmitting file data ... Committed revision 29058.
        Hide
        Jack Van Ooststroom added a comment -

        The new icecore:redirect component has been added and documented: http://wiki.icesoft.org/display/ICE/redirect

        It only supports the URL alternative as described in this JIRA using the href attribute of the component. The current existing servlet mappings can help with the remaining alternatives. Marking this one as FIXED.

        Show
        Jack Van Ooststroom added a comment - The new icecore:redirect component has been added and documented: http://wiki.icesoft.org/display/ICE/redirect It only supports the URL alternative as described in this JIRA using the href attribute of the component. The current existing servlet mappings can help with the remaining alternatives. Marking this one as FIXED.

          People

          • Assignee:
            Jack Van Ooststroom
            Reporter:
            Ted Goddard
          • Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: