Java Mailing List Archive

http://www.gg3721.com/

Home » users.tapestry »

T5: Page instance variable default values

Joel Halbert

2008-11-10

Replies: Find Java Web Hosting

Author LoginPost Reply
Hi,

With reference to:
http://tapestry.apache.org/tapestry5/guide/lifecycle.html

"Tapestry takes special care to purge all instance variables back to
their default value at the end of each request."


How is the default value determined?

I have noticed that if I declare a class variable on my page, like so:


private HashSet<String> myVar = new HashSet<String>();


It's state will persist across requests i.e. if on one page request I
populate it, the populated state will be visible to the next request,
whereas I was expecting an empty Set.

Is this expected, I can initialise my variable within onActivate or a
@SetupRender method instead, but I want to check in to see what the
documented behaviour should be.

(Note that the variable has not been marked @Persist in any way, I am
using 5.0.15)

Rgs,
Joel


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@(protected)
For additional commands, e-mail: users-help@(protected)

©2008 gg3721.com - Jax Systems, LLC, U.S.A.