You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Dustin Frazier <ta...@frayzhe.net> on 2005/08/24 21:45:15 UTC
translator support outside of forms
I'm working on some generic form components, and I'm making a version that shows fields of
a given object in read-only mode for users who don't have permission to edit. I was
hoping to go through my various components (TextField, DatePicker, Checkbox, etc.) and
just change them to Insert components, leaving most or all of the parameters the same.
Unfortunately, it doesn't look like the Insert component supports the new translators.
Are there plans to add support for this? It seems like a very natural symmetry with
respect to form input components. Formatting is just one half of what translators do.
As I browse the source for the translator code that's in the Tap4 framework, very little
of it actually has much to do with forms specifically; most if the code is generic
parse/format code for different types. This kind of general-purpose functionality would
be *very* useful outside of the form context.
Dustin
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: translator support outside of forms
Posted by Kent Tong <ke...@cpttm.org.mo>.
Dustin Frazier <tapestry <at> frayzhe.net> writes:
> Unfortunately, it doesn't look like the Insert component supports the new
> translators. Are there plans to add support for this? It seems like a very
> natural symmetry with respect to form input components. Formatting is just
> one half of what translators do.
The Translator in Tapestry 4 can insert javascript into the page to
perform validation. So it's not that simple.
For your purpose, you may make an adaptor adapting a Translator into
a java.text.Format which can be specified as a parameter for the
Insert component.
--
Author of e-book for learning Tapestry (www.agileskills2.org/EWDT)
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org