You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "J (JIRA)" <ji...@apache.org> on 2012/07/05 21:43:33 UTC

[jira] [Created] (WICKET-4639) Make RequestUtils.toAbsolutepath generate correct url for BookMarkablePages that havn't had mountPages set

J created WICKET-4639:
-------------------------

             Summary: Make RequestUtils.toAbsolutepath generate correct url for BookMarkablePages that havn't had mountPages set
                 Key: WICKET-4639
                 URL: https://issues.apache.org/jira/browse/WICKET-4639
             Project: Wicket
          Issue Type: Improvement
          Components: wicket
    Affects Versions: 1.5.7
         Environment: Linux x86_64, jetty
            Reporter: J


When using RequestUtils,toAbsolutePath it will generate bad urls if the page the sent the request was a bookmarkablepage that hadn't been mapped with mountPage.Same example works when mapped with mountPage. I have prepared a quickstart example.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WICKET-4639) Make RequestUtils.toAbsolutepath generate correct url for BookMarkablePages that haven't had "mountPage" set

Posted by "J (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

J updated WICKET-4639:
----------------------

    Description: When using RequestUtils,toAbsolutePath it will generate bad urls if the page the sent the request was a bookmarkablepage that hadn't been mapped with mountPage.Same example works when mapped with mountPage. I have prepared a quickstart example (Based on code from the wicket cookbook)  (was: When using RequestUtils,toAbsolutePath it will generate bad urls if the page the sent the request was a bookmarkablepage that hadn't been mapped with mountPage.Same example works when mapped with mountPage. I have prepared a quickstart example.)
    
> Make RequestUtils.toAbsolutepath generate correct url for BookMarkablePages that haven't had "mountPage" set
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4639
>                 URL: https://issues.apache.org/jira/browse/WICKET-4639
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.7
>         Environment: Linux x86_64, jetty
>            Reporter: J
>         Attachments: wicketchart.zip
>
>
> When using RequestUtils,toAbsolutePath it will generate bad urls if the page the sent the request was a bookmarkablepage that hadn't been mapped with mountPage.Same example works when mapped with mountPage. I have prepared a quickstart example (Based on code from the wicket cookbook)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WICKET-4639) Make RequestUtils.toAbsolutepath generate correct url for BookMarkablePages that haven't had mountPages set

Posted by "J (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

J updated WICKET-4639:
----------------------

    Summary: Make RequestUtils.toAbsolutepath generate correct url for BookMarkablePages that haven't had mountPages set  (was: Make RequestUtils.toAbsolutepath generate correct url for BookMarkablePages that havn't had mountPages set)
    
> Make RequestUtils.toAbsolutepath generate correct url for BookMarkablePages that haven't had mountPages set
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4639
>                 URL: https://issues.apache.org/jira/browse/WICKET-4639
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.7
>         Environment: Linux x86_64, jetty
>            Reporter: J
>         Attachments: wicketchart.zip
>
>
> When using RequestUtils,toAbsolutePath it will generate bad urls if the page the sent the request was a bookmarkablepage that hadn't been mapped with mountPage.Same example works when mapped with mountPage. I have prepared a quickstart example.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WICKET-4639) Make RequestUtils.toAbsolutepath generate correct url for BookMarkablePages that haven't had "mountPage" set

Posted by "J (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

J updated WICKET-4639:
----------------------

    Summary: Make RequestUtils.toAbsolutepath generate correct url for BookMarkablePages that haven't had "mountPage" set  (was: Make RequestUtils.toAbsolutepath generate correct url for BookMarkablePages that haven't had mountPages set)
    
> Make RequestUtils.toAbsolutepath generate correct url for BookMarkablePages that haven't had "mountPage" set
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4639
>                 URL: https://issues.apache.org/jira/browse/WICKET-4639
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.7
>         Environment: Linux x86_64, jetty
>            Reporter: J
>         Attachments: wicketchart.zip
>
>
> When using RequestUtils,toAbsolutePath it will generate bad urls if the page the sent the request was a bookmarkablepage that hadn't been mapped with mountPage.Same example works when mapped with mountPage. I have prepared a quickstart example.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Updated] (WICKET-4639) Make RequestUtils.toAbsolutepath generate correct url for BookMarkablePages that havn't had mountPages set

Posted by "J (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

J updated WICKET-4639:
----------------------

    Attachment: wicketchart.zip

Example to reproduce.

 Run and click on a chart.The path will fail after click. Uncomment the mountPage in *Application and repeat the same as first time. It will now work.   It seems the the RequestUtils.toAbsolutePath cuts  a bit to much from the path IF the mountpage havn't been set. 
                
> Make RequestUtils.toAbsolutepath generate correct url for BookMarkablePages that havn't had mountPages set
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4639
>                 URL: https://issues.apache.org/jira/browse/WICKET-4639
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.7
>         Environment: Linux x86_64, jetty
>            Reporter: J
>         Attachments: wicketchart.zip
>
>
> When using RequestUtils,toAbsolutePath it will generate bad urls if the page the sent the request was a bookmarkablepage that hadn't been mapped with mountPage.Same example works when mapped with mountPage. I have prepared a quickstart example.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (WICKET-4639) Make RequestUtils.toAbsolutepath generate correct url for BookMarkablePages that haven't had "mountPage" set

Posted by "Martin Grigorov (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/WICKET-4639?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Martin Grigorov resolved WICKET-4639.
-------------------------------------

    Resolution: Not A Problem

RequestUtils.toAbsolutePath() works fine. The problem is that you pass it incorrect information as current url.
The *current* url is the one in the browser's address bar, while you use the Ajax request's url instead.

Here is the code that fixes your application:

    public final static String toAbsolutePath(final String relativePagePath) {
	    String s = RequestCycle.get().getUrlRenderer().renderFullUrl(Url.parse(relativePagePath));
	    return s;
    }

UrlRendered uses the 'baseUrl' which is the url in the address bar even for Ajax requests.
                
> Make RequestUtils.toAbsolutepath generate correct url for BookMarkablePages that haven't had "mountPage" set
> ------------------------------------------------------------------------------------------------------------
>
>                 Key: WICKET-4639
>                 URL: https://issues.apache.org/jira/browse/WICKET-4639
>             Project: Wicket
>          Issue Type: Improvement
>          Components: wicket
>    Affects Versions: 1.5.7
>         Environment: Linux x86_64, jetty
>            Reporter: J
>         Attachments: wicketchart.zip
>
>
> When using RequestUtils,toAbsolutePath it will generate bad urls if the page the sent the request was a bookmarkablepage that hadn't been mapped with mountPage.Same example works when mapped with mountPage. I have prepared a quickstart example (Based on code from the wicket cookbook)

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira