Wicket
  1. Wicket
  2. WICKET-1363

Support RestartResponseAtInterceptPageException/continueToOriginalDestination() with Ajax requests

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 1.3.1
    • Fix Version/s: 1.3.2
    • Component/s: wicket
    • Labels:
      None

      Description

      While RestartResponseAtInterceptPageException already works correctly with Ajax requests (e.g. user is redirected to a login page), continueToOriginalDestination() forwards the user to the Ajax request URL (user will get a <ajax-respons>...</ajax-response> on his screen)

      Improvement: The user should rather be forwarded to a proper page.

      Workaround: A custom PageMap implementation
      However, as the method setUpRedirect(RequestCycle) is private, deriving from the default PageMap will require some ugly copy-paste in order to do so. This could be avoided by a) making setUpRedirect(RequestCycle) protected and/or b) introduce a protected method that constructs the interceptContinuationURL inside setUpRedirect(RequestCycle).

      The custom behaviour could be: Redirect to the page the Ajax request belonged to. Or even better: redirect to the Ajax call and render the complete page (well, don't know how tricky that would be).

      see also: http://www.nabble.com/RestartResponseAtInterceptPageException-with-Ajax-td15607225.html

        Activity

        Hide
        Johan Compagner added a comment -

        i just test in the setupRedirect of PageMap if it is an ajax request
        if it is then the intercept url will be that of the ajax request page instead of the ajax url.

        Show
        Johan Compagner added a comment - i just test in the setupRedirect of PageMap if it is an ajax request if it is then the intercept url will be that of the ajax request page instead of the ajax url.
        Hide
        Daisuke Miyamoto added a comment -

        Is this feature still supported in 1.5.x ?

        Show
        Daisuke Miyamoto added a comment - Is this feature still supported in 1.5.x ?

          People

          • Assignee:
            Johan Compagner
            Reporter:
            Stefan Fussenegger
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development