Uploaded image for project: 'Wicket'
  1. Wicket
  2. WICKET-1363

Support RestartResponseAtInterceptPageException/continueToOriginalDestination() with Ajax requests

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: 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

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: