开发者

Wicket path-style parameters

I want to make some site, is should have user profi开发者_如何学Goles accessible under URL like site.com/user/m4ks I have no idea how to make this using Wicket. Its possible to make BookMarkablePage with any wildcards or so?


You need to mount an IRequestTargetUrlCodingStrategy to achieve this. My suggestion would be MixedParamHybridUrlCodingStrategy. There you can define an array of known parameter names that will be appended to the URL like this: mypage/param1/value1/param2/value2, while other unknown parameters will be appended like this mypage?param3=value3.

Anyway, here's a tutorial page on how to mount Bookmarkable pages and use UrlCodingStrategies.


Look at URL Coding strategies. They are explained in the wicket wiki. You are looking for the 'IndexedParamUrlCodingStrategy'. Javadoc is here.

Edit: Damn you Sean, you where faster.. ;)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜