On 29 sep 2009, at 16.12, Thiago H. de Paula Figueiredo wrote:
One simple question related to this: if I have a service that is
used by
many components and that holds a list of component related
information,
how do I make this request related?
Your service must have the perthread scope. A new instance will be
created for each request, as each one is served by one thread.
More details at http://tapestry.apache.org/tapestry5.1/tapestry-ioc/service.html
, section Defining Service Scope.
Great! I missed that part of the docs. Unfortunately, I get a problem
with the component render cycle. Right now, in my test case, a component
registers with the service within the afterRender() phase and this will
trigger the creation of my per-thread service. So far, so good.
Now, when I click on one of my test ajax action links, my custom
component
event handler filter routes the event to my service but since this is a
new request, it already has been freed and will be created again.
How can I make sure that information from component construction time
will
survive so it can be used when the ajax event is processed?
/Andreas
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org