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
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 wa
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
http://tapestry.apache.org/current/apidocs/org/apache/tapestry5/ioc/Message
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 cust
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
content="${format:date=-MM-DD hh:mm:ss 'UTC' Z,someDate}
On Wed, 14 May 2014 09:09:25 -0300, Chris Poulsen
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,
please avoid sayin
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 wrote:
> You probably do not want the ${ } as that converts its contents into a
> string.
>
> --
> Chris
>
>
> On Wed, May 14,
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 wrote:
> I understand that I can do this in the tml:
>
> format="literal:-MM-DD hh:mm:ss 'UTC' Z">
>
>
> But I want to put the value into an att
I understand that I can do this in the tml:
But I want to put the value into an attribute to suit a Google schema
microformat, like this:
This does not work. What am I missing here?
Ari Maniatis
--
-->
Aristedes Maniatis
ish
http://www.ish.com.au
Level 1, 3