How do I mimic HybridUrlCodingStrategy in Wicket 1.5?

We have an existing Java Wicket 1.4 application which uses the HybridUrlCodingStrategy extensively:

mount(new HybridUrlCodingStrategy("/myurl", MyPage.class));

This results in our URL's looking like:

http://host/myurl/paramName1/paramValue1/paramName2/paramValue2

I would like to maintain this URL format in Wicket 1.5, however the HybridUrlCodingStrategy has been removed. In wicket 1.5, pages are mounted as:

mountPage("/myurl", MyPage.class);

Which results in traditional URLs like:

http://host/myurl?paramName1=paramValue2&paramName2=paramValue2

I have read that we should be using the MountedMapper class, but looking at the Wicket 1.5 examples, API docs, and source code, it is still not clear to me how to get the same behavior with MountedMapper as we are getting with the HybridUrlCodingStrategy.

Does anyone know how to do this?

11
задан ThePizzle 27 May 2011 в 15:28
поделиться