You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@turbine.apache.org by "Pugh, Eric" <EP...@MuseumCompany.com> on 2001/11/28 15:42:19 UTC

Page Session Question

Hi all,

I seem to remember that with servlets, if I declare a private variable, and
then reload the servlet, the servlet remembers the variable.  In otherwords,
a servlet can be made stateful...

Does a similar thing exist with screens?  To preserve data across screens I
have put data in the user object.  What about on a single screen?

I added a private int pageCounter = 0 to my screen.  Then in the
doBuildTemplate method I increment the pageCounter, and put it in the
pageContext.  However, when I reload the page, the pageCounter is always 1,
it never seems to increment.

How can I store data from one load of a screen to another?  Putting stuff in
the userObject sometimes seems kinda clumsy.

Eric

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>