Hi,
(Using Wicket 6.0-SNAPSHOT, or 1.5.7)
I found a strange behavior when calling Page#isPageStateless(). I have a
simple label in my personal wicket debug bar which displays "stateless"
when a page is stateless. It works like so:
new WebMarkupContainer("statelessMarker") {
@Override
protected void onConfigure() {
super.onConfigure();
setVisible(getPage().isPageStateless());
}
};
This worked great until I got by chance a page which was stateless
except for ajax links which were children of a repeater. Here is what
happens then:
1) onConfigure() is called which calls isPageStateless() and determines
the page is stateless
2) onBeforeRender() is executed which populates the repeaters and adds
stateful components to the tree
3) Since the page was determined stateless in 1), it stays that way
4) stateful ajax callback links do not work on the page
Therefore, it seems that isPageStateless() should never be called before
onBeforeRender() is executed or mayhem may ensue. However, after cursory
inspection of callers of isPageStateless(), it looks like that is not
always the case so I'm not certain.
Should this be considered a bug? Should an assertion be made in
isPageStateless() that onBeforeRender() was executed?
Regards,
Bertrand
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org