On Wed, 07 Apr 2010 09:34:21 -0300, Pierce T. Wetter III <pie...@paceap.com> wrote:

1. What if the eventlink is nested several layers deep in components? Then value has to be passed all the way down...

The context in the Loop wouldn't solve this problem. The context is only passed from the event that triggered the event (in your case, the EventLink). The object is something that the components need, so it must be a parameter of them. Another solution is to use the Environmental service (http://tapestry.apache.org/tapestry5.1/guide/env.html).

2. Now the nested component needs to know about how the value object is encoded, which makes the nested component less "generic" and therefore less reusable.

Implement a ValueEncoder for your object class and contribute it to the ValueEncoderSource service. Then, when you need to encode something, just get the appoprieate ValueEncoder from that service.

--
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

Reply via email to