Em Mon, 24 Aug 2009 08:10:37 -0300, Scot Mcphee <scot.mcp...@gmail.com>
escreveu:
I've got a class, that is ever only display-only. I need to show the
date in the class in a specific format. What I cannot see how to do,
is specify the format for the date of this class.
The format used by Grid and BeanDisplay to format dates is defined by the
date Tapestry data type and its corresponding view block. Looking at
PropertyDisplayBlocks source, the format used is
DateFormat.getDateInstance(DateFormat.MEDIUM, locale). We could add a JIRA
asking for some way to provide your own date formatter (maybe some service
with a default implementantion that we can override).
One solution is to provide a new view block for your class dates. You'll
need to implement a DataTypeAnalyzer, return a "formatteddate" type for
your class dats, contribute it to the DataTypeAnalyzer service, then
provide a view and an edit block for it. Take a look at TapestryModule to
find some examples.
--
Thiago H. de Paula Figueiredo
Independent Java consultant, developer, and instructor
http://www.arsmachina.com.br/thiago
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org