Thanks Thiago. I'm using the example at the link you specified, but found I needed to provide validators and translators to complete the approach, esp. the translator being missing / not bound was causing a NPE somewhere along the line. I can update the block to display the fields (sub fields in ex. Address) but was wondering more about how the value is translated from what is posted back into an Address object - is that not what the Translator would do? I'm probably missing something obvious here ...
Regards, Jim. -----Original Message----- From: Thiago H. de Paula Figueiredo [mailto:[email protected]] Sent: 10 December 2009 11:31 To: Tapestry users Subject: Re: Validators / Translators question Em Thu, 10 Dec 2009 09:01:05 -0200, Jim O'Callaghan <[email protected]> escreveu: > Hi, Hi! > Client - is it an incorrect approach to used Validators / Translators in > this scenario and if so can anyone advise on how to abstract and reuse an > embedded Address rendering approach? Validators and translators are meant to be used with form fields, not rendering. They're not used by Grid nor BeanDisplay. To do what you want, you need to provide a viewing block to your Address class. The corresponding documentation is http://tapestry.apache.org/tapestry5.1/guide/beaneditform.html, section "Adding New Property Editors". -- 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: [email protected] For additional commands, e-mail: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
