I am trying to make a page of my project completely stateless (more pages to come) and by doing get rid of the page version number, e.g. /mypage/?0
The page sets statelessHint
to true, I have also verified in onBeforeRender
that isStateless
returns true.
I also use the @StatelessComponent
annotation to make sure the page and its child components are really, really stateless.
So, it seems that everything is stateless, however the version parameter is still appended to the URL
I cannot attach the code, since it is a huge construct with many components and a lot of inheritance involved. Of course, I do not expect anyone to tell me where there problems is, but rather hope for some to give me a hint when to place a breakpoint in Wicket's sources to find out what is going wrong. E.g. can anybody tell me which Wicket class is responsible for deciding whether or not to append the version parameter?
Thanks in advance, Peter
Obviosuly, @StatelessComponent
is not always reliable down into all child components :(
You can debug this by setting the log level for org.apache.wicket.Page
to DEBUG
, which adds loads of lines to your console output. Grep for "is not stateless because" to find messages about rendered components that are stateful.
In my case, it was an Image
, whose getStatelessHint()
method returned false
(no idea why).