You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Proginov (JIRA)" <ji...@apache.org> on 2010/02/19 14:24:28 UTC
[jira] Commented: (WICKET-2312) RequestUtils.toAbsolutePath() not
output hostname and url-pattern in AJAX
[ https://issues.apache.org/jira/browse/WICKET-2312?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12835741#action_12835741 ]
Proginov commented on WICKET-2312:
----------------------------------
This solution seems to have created a new bug. We use Bookmarkable page and have a redirection on an ajax link like this :
Link link = new AjaxLink("link") {
@Override
public void onClick(AjaxRequestTarget target) {
setResponsePage( ModelePagePanier.stdClass );
}
};
The start page is http://website.com/produits/racine/autoportee.html and the link should redirect to http://website.com/panier.html but redirect to http://website.com/produits/racine/panier.html.
The mountpath associated to the class ModelePagePanier is "panier.html" and the mount path associated with the start page is "produits/racine/autoportee.html".
With wicket 1.4.5 everything works fine but since this modification in 1.4.6 my redirection in ajax links doesn't work anymore.
> RequestUtils.toAbsolutePath() not output hostname and url-pattern in AJAX
> -------------------------------------------------------------------------
>
> Key: WICKET-2312
> URL: https://issues.apache.org/jira/browse/WICKET-2312
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.6
> Environment: CentOS release 5.2 , systemwide UTF-8 , resin-3.1.6 , use WicketServlet instead of WicketFilter
> Reporter: smallufo
> Assignee: Igor Vaynberg
> Fix For: 1.4.6
>
> Attachments: src-wicket-2312.tar.gz, wicket-2312-patch.txt, wicket-2312-quickstart-1.4rc5.zip
>
>
> 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)
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.