What sort of application data is automatically stored in the wicket
servlet's HttpSession (for simplicity, assume that models are not
detachable).
First youre wicket session object (and everything you put in it when you subclass it)
is stored in the session.
Second are the pagemaps, the default one and x that you create.
But those don't reference much just some browser stack and some counter/name
And no user data at all.
Last the Pages itself. Then by default the last 5 pages or version of pages (some mix of those 2)
A page has the component structure and there models with data. And if you don't use detachable models
then everything a model holds will also be in the session.
What sort of data, if any, is stored in secret fields in the HTML on the
client's browser?
Almost nothing. We don't use hidden fields. Maybe except one but that is pure for event dispatching
inside a form dispatch, So that you don't loose form data when you hava an onSelectionChange listener
on a Select box.
If I declare a variable in a Wicket object's constructor, what happens
to its value when the constructor completes its execution? Does it
vanish, or is it saved somewhere for the next time the page is built?
This is plain java.
if you use a instance variable it will of course be saved in the component.
Or if you use a local vairable but you make it final and reference to it in a anonymous class then
this will also be converted to a instance variable of the anonymous class. But this is plain java
doesn't have anything do do with wicket.
I notice that users never seem to declare instance variables in their
subclasses of Wicket objects. Why is this? If I did create an instance
variable, how would Wicket use it?
There is mostly no need. Because a instance variable moslty just means that it is model data.
So it should go into the model.
Buf if you declare it then yes it is again Plain java the variable is stored in the session because it is stored
in the component of wicket.
johan
