Em Wed, 24 Jun 2009 18:11:28 -0300, Howard Lewis Ship <hls...@gmail.com> escreveu:

@Retain are per-instance which can be much different than a static.

@Retain looked like a good idea at the time, but I have never used it in a project.

I use it to cache some class-specific values got from services in generic abstract pages (Tapestry CRUD' BaseEditPage, for example). In BaseEditPage, I need a Controller instance, but it is specific to the entity class being edited, and there's one BaseEditPage subclass for each entity class. Instead of using my ControllerSource service everytime I need a Controller, I @Retain the Controller instance, setting it in BaseEditPage's constructor.

--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago

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

Reply via email to