Steve Swinsburg wrote:


Hi all,

I have just noticed that mountBookmarkablePage changes the delimiters of query string object to be all forward slashes. Why is this?
For instance I want to get a url to a page class:
urlFor(MyPage.class, new PageParameters("id=" + userId)).toString());

which gives:
?wicket:bookmarkablePage=:my.package.here.MyPage&id=123456789


which is fine, but I wanted to get rid of the package name, so I mounted the page like so:

mountBookmarkablePage("/myPage", MyPage.class);

and the same urlFor result gives:

myPage/id/123456789/


In my circumstances I cannot have slashes (legacy restriction) and must have the ?&= style parameters but I still need the package to be hidden, how could I go about doing this?
Use this:

mount(new QueryStringUrlCodingStrategy(pages[i+1], pageClass));



This will use the coding strategy you need. BTW, I'd like to have something as:

   myPage/123456789

that is "id" should be treated as a default parameter. I've searched but I didn't find a preset UrlCodingStrategy: I suppose I need to write my own, right?

--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog
fabrizio.giud...@tidalwave.it - mobile: +39 348.150.6941

Reply via email to