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

RequestUtils.toAbsolutePath() not output hostname and url-pattern in AJAX

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.3.6
    • 1.4.6
    • wicket
    • None
    • CentOS release 5.2 , systemwide UTF-8 , resin-3.1.6 , use WicketServlet instead of WicketFilter

    Description

      This is my code :

      String a1 = RequestUtils.toAbsolutePath(getRequestCycle().urlFor(CurrentPage.class , pps).toString());
      System.out.println("a1 = " + a1);

      Link link = new AjaxFallbackLink("link")
      {
      @Override
      public void onClick(AjaxRequestTarget target)

      { String a2 = RequestUtils.toAbsolutePath(getRequestCycle().urlFor(CurrentPage.class , pps).toString()); System.out.println("a2 = " + a2); }

      };

      The wicket application's url-pattern is "/app/*"
      I am viewing a mounted bookmarkable page : CurrentPage , with an AJAX-link.
      I want to get the absolute Path in the AJAX onClick() method ,

      Here is the output :

      a1 = http://foo.bar/app/CurrentPage/para1/value1
      a2 = http:///CurrentPage/para1/value1

      a1 is correct , while a2 lacks of hostname and url pattern (which WicketServlet listens to)

      Attachments

        1. src-wicket-2312.tar.gz
          4 kB
          smallufo
        2. wicket-2312-quickstart-1.4rc5.zip
          12 kB
          Matt Brictson
        3. wicket-2312-patch.txt
          2 kB
          Matt Brictson

        Issue Links

          Activity

            People

              ivaynberg Igor Vaynberg
              smallufo smallufo
              Votes:
              3 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: