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

setResponsePage() to mounted Page fails to redirect correctly

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.5-RC1
    • Fix Version/s: 1.5-RC2
    • Component/s: wicket
    • Labels:
      None
    • Environment:
      Reproduced this on Jetty 6.1.23 on Sun JDK on Ubuntu, as well as the Quickstart Jetty on Sun JDK on Windows 7

      Description

      calling setResponsePage() within a Form#onSubmit( ) to a mounted Page will:

      1. Not redirect to the mounted URI
      2. Screw up path rewriting for all elements on the rendered page.

      I have attached a quickstart zipfile in which I am able to reproduce the issue. Here's a quick description of what happens:

      PageOne.class is mounted to /pageone
      PageTwo.class is mounted to /pagetwo

      PageOne has a Form with a single setResponsePage( PageTwo.class ); in its onSubmit( );

      When PageOne's form is submitted, instead of redirecting to /pagetwo, the page uri is something like /wicket/page?0-1.IFormSubmitListener-form

      Any subsequent path references on the rendering of PageTwo are broken, since the browser thinks the relative path origin is /wicket/, whereas wicket likely thinks it's /

        Attachments

        1. brokenform.zip
          22 kB
          David Hansen

          Issue Links

            Activity

              People

              • Assignee:
                ivaynberg Igor Vaynberg
                Reporter:
                haploid David Hansen
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: