Em Thu, 24 Dec 2009 01:09:03 -0200, Benny Law <benny.mk....@gmail.com>
escreveu:
Hi Thiago,
Hi!
I just thought of another idea and would like to bounce it off you.
Instead of subclassing AbstractTextField to create NumericField, I can
just use
TextField as is, but define a new binding prefix for the translate
parameter
which will allow the format pattern to be specified as the binding
expression, like this:
<t:textfield t:id="latitude" translate="numberformat:0.00000" />
This is very clever! I guess it'll work. :) Just pay attention that the
parameter received by the translate is a FieldTranslator, not a Translator
itself.
--
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