On Tue, 24 May 2011 19:13:31 -0300, <jackkuros...@w9z.org> wrote:

How do you generate your fields?

Each event has an ordered list of attribute definitions. When someone registers for the event, the page loops through the list of attributes. If the attribute definition says it is to be a short field, it renders as a textField. If it is long, it renders as a text area. Multiple people can be registered at the same time, so this loop is in another loop that executes once for each attendee.

In this case, you have exactly one TextArea instance and one TextField instance, regardless of how many times you render them inside a loop. Give each one a t:id and use @InjectComponent to get them. All Tapestry-provided form field components are Field implementations, so you can use them in FormValidatorSource methods.

--
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: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to