Re: formatting attributes

2014-05-17 Thread Lance Java
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

Re: formatting attributes

2014-05-16 Thread Robert Zeigler
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

Re: formatting attributes

2014-05-16 Thread Aristedes Maniatis
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

Re: formatting attributes

2014-05-15 Thread Thiago H de Paula Figueiredo
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,

Re: formatting attributes

2014-05-15 Thread Jens Breitenstein
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

Re: formatting attributes

2014-05-15 Thread Lance Java
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

formatting attributes

2014-05-14 Thread Aristedes Maniatis
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

Re: formatting attributes

2014-05-14 Thread Chris Poulsen
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

Re: formatting attributes

2014-05-14 Thread Chris Poulsen
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