Thanks, Thiago. I'm glad to have helped Juan and that my answer was "absolutely correct". ;-)
Atenciosamente, Matheus Eduardo Machado Moreira matheus....@gmail.com "Violence is the last refuge of the incompetent." Salvor Hardin (The Foundation, Isaac Asimov) 2010/3/25 Thiago H. de Paula Figueiredo <thiag...@gmail.com> > On Thu, 25 Mar 2010 09:27:21 -0300, Matheus Eduardo Machado Moreira < > matheus....@gmail.com> wrote: > > Hi, folks. I'm just learning Tapestry too but I want to participate in >> the list. :-) >> > > Welcome to this list, Matheus! > > > Juan, I don't know much about Tapestry (yet!) but if I'm not mistaken >> that declaration of your service isn't adequate. >> > > Absolutely correct. It isn't adequate because every field that hasn't > annotations (except @Property), after a request, is set to its initial value > (the one defined in its declaration). In your code, the field always point > to the same Service object. It isn't in the session: actually, it's shared > by all users that use that specific page instance. Tapestry page instances > are pooled. Read more about the pool in the "Principle 1 -- Static > Structure, Dynamic Behavior" session of > http://tapestry.apache.org/tapestry5.1/. > > > You should use a method to handle the "activate" event and there >> initialize your property: >> > > Or some rendering event handler, like @SetupRender. > > -- > Thiago H. de Paula Figueiredo > Independent Java, Apache Tapestry 5 and Hibernate consultant, developer, > and instructor > Owner, software architect and developer, 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 > >