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

AjaxLink.onClick() -> setResponsePage(...) redirects to wrong url

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.5-M2.1
    • 1.5-M3
    • None
    • None

    Description

      see attached quickstart.tar.gz (wicket 1.5-SNAPSHOT)

      quickstart contains 2 test pages (Test1Page and Test2Page) which contains a AjaxLink which simple sets the response page in its onClick method to the ResultPage.

      Test1Page's url is: http://localhost:8080/wicket/bookmarkable/com.mycompany.Test1Page
      which results in after clicking on the ajax link: http://localhost:8080/wicket/bookmarkable/bookmarkable/com.mycompany.ResultPage

      Test2Page is mounted and it's url is: http://localhost:8080/test2
      which results in after clicking on the ajax link: http://localhost:8080/bookmarkable/com.mycompany.ResultPage

      the WebPageRenderer.redirectTo(..) tries to create a relative url... which will be rendered related to the current request...
      for both above cases the current request is e.g. http://localhost:8080/wicket/page?6-1.IBehaviorListener.0-ajaxLink

      in the WebPageRenderer.redirectTo(..) to create the

      Attachments

        1. quickstart.tar.gz
          5 kB
          Gabriel Bucher
        2. 3086.patch
          6 kB
          Gabriel Bucher

        Activity

          People

            ivaynberg Igor Vaynberg
            gabriel.bucher Gabriel Bucher
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: