If you really want this feature then you can write a custom binding prefix.
It can work exactly as you want
I'm trying to steer our team away from embedding style and formatting in
Java code
Well, you need to either do it in the template or in the Java code. Both
the template and the component
Why not specify the format to use in the i18n properties file for the template?
Then your java code can read in the date string from he property file. Tapestry
makes this über simple, just inject the Messages object (see
Lance Java wrote:
I'm not sure how you have assumed that tapestry knows how understand a
format: binding prefix. Certainly none of the tapestry documentation
mentions it?
I was trying to extrapolate from this:
http://wiki.apache.org/tapestry/Tapestry5HowToFormatDateTimeEtc
Really, I wasn't
content=${format:date=-MM-DD hh:mm:ss 'UTC' Z,someDate}
On Wed, 14 May 2014 09:09:25 -0300, Chris Poulsen mailingl...@nesluop.dk
wrote:
You probably do not want the ${ } as that converts its contents into a
string.
The original poster didn't describe what he meant by not work. Guys,
What about a component like this:
public class DateFormatter
{
@Inject private Messages _messages;
@Parameter(required = true, defaultPrefix = prop) private Date _date;
@Parameter(required = false, defaultPrefix = literal) private
String _format;
boolean beginRender(final
I'm not sure how you have assumed that tapestry knows how understand a
format: binding prefix. Certainly none of the tapestry documentation
mentions it?
The simple solution is to provide a getter for the formatted date String.
If you really want a format: binding prefix, you can create a custom
I understand that I can do this in the tml:
span itemprop=startDatet:output value=someDate
format=literal:-MM-DD hh:mm:ss 'UTC' Z/span
But I want to put the value into an attribute to suit a Google schema
microformat, like this:
abbr itemprop=startDate
You probably do not want the ${ } as that converts its contents into a
string.
--
Chris
On Wed, May 14, 2014 at 8:24 AM, Aristedes Maniatis a...@ish.com.au wrote:
I understand that I can do this in the tml:
span itemprop=startDatet:output value=someDate
format=literal:-MM-DD
Sorry, apparently I didn't really read your question ;)
Can't you create a getter in your page to return what you need?
On Wed, May 14, 2014 at 2:09 PM, Chris Poulsen mailingl...@nesluop.dkwrote:
You probably do not want the ${ } as that converts its contents into a
string.
--
Chris