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

WebPageRenderer should honor RedirectPolicy.ALWAYS_REDIRECT more consistently

    XMLWordPrintableJSON

Details

    Description

      In WebPageRenderer shouldPreserveClientUrl() currently has precedence over RedirectPolicy.ALWAYS_REDIRECT.

      This can lead to confusion or unexpected behavior when RedirectPolicy.ALWAYS_REDIRECT is explicitely set, but for some reason shouldPreserveClientUrl() returns true and thus no redirect is performed due to the logic in WebPageRenderer.

      A fix for this particular problem could be implemented in
      WebPageRenderer as of Wicket 6.12.0 by changing line 211 to:

      (shouldPreserveClientUrl && getRedirectPolicy() != RedirectPolicy.ALWAYS_REDIRECT)) //

      Note that this problem is slightly related to WICKET-5484. Both fixes combined the line could look like this:

      (shouldPreserveClientUrl && !isAjax && getRedirectPolicy() != RedirectPolicy.ALWAYS_REDIRECT)) //

      Attachments

        Issue Links

          Activity

            People

              mgrigorov Martin Tzvetanov Grigorov
              sludwig Sven Ludwig
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: