kamil
kamil

Reputation: 3512

wicket 1.5 new urls

After migration from wicket 1.4 to wicket 1.5 I can see a new behaviour concerning web URLs. Every pages has ?[0-9]+ added to it for example http://mywickethomepage.com/?0 , http://mywickethomepage.com/?3 .

My question is: what actually it is? Googling just gave me a hint that's an id for stateful page, right? Question number two, is there (an easy) way to hide/remove it as it makes my page urls ugly?

Upvotes: 2

Views: 830

Answers (1)

martin-g
martin-g

Reputation: 17503

This is the page id for stateful pages. A stateful page is instantiated just once and then with each request to it Wicket will load it from the disk and reuse it. Wicket 1.4 behaved the same way with its special wicket:interface parameter. Only Hybrid(Indexed)UrlCodingStrategy worked like MountedMapper in Wicket 1.4.

Even this is the default behavior it is not necessary the mandatory. You can implement your own IRequestMapper that encodes/decodes the Url as you wish. See http://wicketinaction.com/2011/07/wicket-1-5-request-mapper/ for more information.

Upvotes: 1

Related Questions