You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Steve Swinsburg <st...@gmail.com> on 2010/01/15 12:29:55 UTC

urlFor works, but combined with mountBookmarkablePage it doesn't

Hi all,

I have the following code which generates a URL to a page with some parameters:
String url = urlFor(MyMessageView.class, new PageParameters("thread=" + "ad9697d2-8328-43b4-be28-ee677a88bc9a")).toString();

This generates a URL like so:
?wicket:bookmarkablePage=:org.mypackage.pages.MyMessageView&thread=ad9697d2-8328-43b4-be28-ee677a88bc9a

which works, it takes me to the right page and everything is constructed correctly.

However, if I then mount that page as a bookmarkable page:
mountBookmarkablePage("/messages", MyMessageView.class);

then the URL created by the same urlFor method above is:
/messages/thread/ad9697d2-8328-43b4-be28-ee677a88bc9a

and this does not work. 

Any ideas?

thanks,
Steve



Re: urlFor works, but combined with mountBookmarkablePage it doesn't

Posted by Steve Swinsburg <st...@gmail.com>.
Hi,

Thanks for the tips. Unfortunately, the container I am deploying into is stripping the request parameters. I've had to code my own bookmarkable page link method for this container.

cheers,
Steve


On 16/01/2010, at 12:36 AM, Martin Grigorov wrote:

> On Fri, 2010-01-15 at 22:29 +1100, Steve Swinsburg wrote:
>> Hi all,
>> 
>> 
>> I have the following code which generates a URL to a page with some
>> parameters:
>> String url = urlFor(MyMessageView.class, new PageParameters("thread="
>> + "ad9697d2-8328-43b4-be28-ee677a88bc9a")).toString();
>> 
>> 
>> This generates a URL like so:
>> ?wicket:bookmarkablePage=:org.mypackage.pages.MyMessageView&thread=ad9697d2-8328-43b4-be28-ee677a88bc9a
>> 
>> 
>> which works, it takes me to the right page and everything is
>> constructed correctly.
>> 
>> 
>> However, if I then mount that page as a bookmarkable page:
>> mountBookmarkablePage("/messages", MyMessageView.class);
>> 
>> 
>> then the URL created by the same urlFor method above is:
>> /messages/thread/ad9697d2-8328-43b4-be28-ee677a88bc9a
> Looking it I would say it should work but I am not that familiar with
> it.
> 
> Try with mount(new SomeUrlCodingStrategy("/messages",
> MyMessageView.class))
> 
> e.g. IndexedParamUrlCodingStrategy, IndexedHybridUrlCodingStrategy, ...
>> 
>> 
>> and this does not work. 
>> 
>> 
>> Any ideas?
>> 
>> 
>> thanks,
>> Steve
>> 
>> 
>> 
>> 
>> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
> For additional commands, e-mail: users-help@wicket.apache.org
> 


Re: urlFor works, but combined with mountBookmarkablePage it doesn't

Posted by Martin Grigorov <mc...@e-card.bg>.
On Fri, 2010-01-15 at 22:29 +1100, Steve Swinsburg wrote:
> Hi all,
> 
> 
> I have the following code which generates a URL to a page with some
> parameters:
> String url = urlFor(MyMessageView.class, new PageParameters("thread="
> + "ad9697d2-8328-43b4-be28-ee677a88bc9a")).toString();
> 
> 
> This generates a URL like so:
> ?wicket:bookmarkablePage=:org.mypackage.pages.MyMessageView&thread=ad9697d2-8328-43b4-be28-ee677a88bc9a
> 
> 
> which works, it takes me to the right page and everything is
> constructed correctly.
> 
> 
> However, if I then mount that page as a bookmarkable page:
> mountBookmarkablePage("/messages", MyMessageView.class);
> 
> 
> then the URL created by the same urlFor method above is:
> /messages/thread/ad9697d2-8328-43b4-be28-ee677a88bc9a
Looking it I would say it should work but I am not that familiar with
it.

Try with mount(new SomeUrlCodingStrategy("/messages",
MyMessageView.class))

e.g. IndexedParamUrlCodingStrategy, IndexedHybridUrlCodingStrategy, ...
> 
> 
> and this does not work. 
> 
> 
> Any ideas?
> 
> 
> thanks,
> Steve
> 
> 
> 
> 
> 



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