On Mon, 27 Sep 2010 16:47:38 -0300, Yunhua Sang <yunhua.s...@gmail.com> wrote:

Hi everyone,

Hi!

The field is always null when printing it out within run method; a
workaround is to define a local variable then access this variable in
new thread.I am wondering whether it's an expected behaviour or not.

It's expected behavior after Tapestry does not uses a page pool anymore. Even before the change this would be very bad programming, as it would uses fields from an object that is pooled for threads.

Instead of relying in an anonymous class, create a normal one and pass all the info it needs in its constructor.

--
Thiago H. de Paula Figueiredo
Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, and instructor
Owner, Ars Machina Tecnologia da Informação Ltda.
http://www.arsmachina.com.br

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to