You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Andrew Lombardi <an...@mysticcoders.com> on 2011/01/22 17:53:10 UTC

Problem with links on page if multiple mounts

Okay I mount the following patterns with wicket 1.5

1)        mountPage("/view/${0}", ViewPublicPage.class);
2)        mountPage("/view/${0}/${1}", ViewPublicPage.class);

{0} is for the paste ID
{1} is an (optional) parameter giving line numbers to highlight in the paste

With Wicket 1.4 this was mounted fine with both the {0} and {1} parameter using an IndexedParamUrlCodingStrategy.

With 1.5, if I only use the first mount, the "Report Abuse" link on the page works fine.  But if I use the second mount, I believe it thinks that the Page should be handling the request which looks like this:

/view/52/?0-1.ILinkListener-markAbuseLink

Which makes sense, as it does match ${0}/${1}

So, is there any way I can make this work?  Can I get Wicket to use a different path for these links?  Is there a better way to mount these pages that I'm not thinking about?

Thanks!


To our success!

Mystic Coders, LLC | Code Magic | www.mysticcoders.com

ANDREW LOMBARDI | andrew@mysticcoders.com
ofc: 714-352-0298
fax: 714-782-6024
cell: 714-697-8046
linked-in: http://www.linkedin.com/in/andrewlombardi
twitter: @kinabalu
facebook: http://www.facebook.com/lombardi
fan mystic: http://www.facebook.com/mysticcoders
flickr: http://www.flickr.com/photos/kinabalu

Eco-Tip: Printing e-mails is usually a waste.

--
If this message wasn't addressed to you, don't use, disclose, distribute, print or copy any part of this message


Re: Problem with links on page if multiple mounts

Posted by Igor Vaynberg <ig...@gmail.com>.
hrm. i think one of the problems we have solved in 1.5, or at least i
thought we did, is that we always normalize the last slash in the url
(remove it), so the url should actually be:
/view/52?0-1.ILinkListener-markAbuseLink, notice to slash between 52
and ?. hrm. create a quickstart.

-igor


On Sat, Jan 22, 2011 at 8:53 AM, Andrew Lombardi
<an...@mysticcoders.com> wrote:
> Okay I mount the following patterns with wicket 1.5
>
> 1)        mountPage("/view/${0}", ViewPublicPage.class);
> 2)        mountPage("/view/${0}/${1}", ViewPublicPage.class);
>
> {0} is for the paste ID
> {1} is an (optional) parameter giving line numbers to highlight in the paste
>
> With Wicket 1.4 this was mounted fine with both the {0} and {1} parameter using an IndexedParamUrlCodingStrategy.
>
> With 1.5, if I only use the first mount, the "Report Abuse" link on the page works fine.  But if I use the second mount, I believe it thinks that the Page should be handling the request which looks like this:
>
> /view/52/?0-1.ILinkListener-markAbuseLink
>
> Which makes sense, as it does match ${0}/${1}
>
> So, is there any way I can make this work?  Can I get Wicket to use a different path for these links?  Is there a better way to mount these pages that I'm not thinking about?
>
> Thanks!
>
>
> To our success!
>
> Mystic Coders, LLC | Code Magic | www.mysticcoders.com
>
> ANDREW LOMBARDI | andrew@mysticcoders.com
> ofc: 714-352-0298
> fax: 714-782-6024
> cell: 714-697-8046
> linked-in: http://www.linkedin.com/in/andrewlombardi
> twitter: @kinabalu
> facebook: http://www.facebook.com/lombardi
> fan mystic: http://www.facebook.com/mysticcoders
> flickr: http://www.flickr.com/photos/kinabalu
>
> Eco-Tip: Printing e-mails is usually a waste.
>
> --
> If this message wasn't addressed to you, don't use, disclose, distribute, print or copy any part of this message
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org