On Fri, 09 Mar 2012 19:14:40 -0300, hese <1024h...@gmail.com> wrote:

Thanks.  I was hoping I could use 'format' to get this done by using
something as simple as '%,13d', but looks like I'll have to resort to a java method and CSS.
According to tapestry documentation format takes a java.text.Format, so
wondering why '#,###' doesn't work.

Yep, it takes a Format, but you provided a String, and Tapestry itself only provides a coercion from String to DateFormat, not to NumberFormat. Summary: the component is using a DateFormat instead of a NumberFormat. If you passed a NumberFormat to the format parameter, it would work.

You can very easily create an OutputNumber component if you want. Or, not so easily, create a binding in which you can specify the value and the format.

Regarding the alignment: it should be done by CSS because there's no other way of doing that (unless you want to resort to formatting attributes in HTML, which suck). This is not a limitation of Tapestry: it's just how HTML works.

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