Hi Thiago, Thanks for your response. Yes, the code looks not nice, however, there is nothing wrong with it. I knew there was a refactoring of changing pool to singleton recently, so I was able to come up with a workaround quickly, but for a Tapestry newbie, he/she might not know what's going on, then will spend a lot of time to figour out.
Yunhua On Mon, Sep 27, 2010 at 4:13 PM, Thiago H. de Paula Figueiredo <[email protected]> wrote: > On Mon, 27 Sep 2010 16:47:38 -0300, Yunhua Sang <[email protected]> > 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: [email protected] > For additional commands, e-mail: [email protected] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
