Thanks so much Igor, the quick reply is much appreciated.
Damian Igor Vaynberg wrote:
your page is stateless because it just has a label on it. stateless pages do not create a session. if a stateless page is hit and no session is yet created wicket will create a fake session so that getsession() still returns something meaningful - but this session object will not be stored into the httpsession. your page that has a form on it is no longer stateless and thus needs to be stored in httpsession - so wicket persists its session into httpsession once that page is hit. if you want to force wicket to create session call getsession().bind(); -igor On Jan 30, 2008 7:01 PM, Damian Penney <[EMAIL PROTECTED]> wrote:Why are new sessions created until wicket finds a form? I have a Session subclass that has a field clicks. On page A I grab the session and show the number of clicks. Everytime I refresh the click count is 0, and the newSession method is called in WebApplication. add(new Label("clickCount", ((HelloSession)getSession()).getClickCount())); getClickCount() return clicks++; If I head to page B that has a form on it the session sticks, and my click count starts to increment and the calls to newSession end. So my question is, why is newSession called repeatedly until I hit a form and how do I change this behavior (or am I missing something fundamental here) Thanks, Damian --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
