As you can see, there's a lot of options, and on that note I'll add one
more. You can use the DateFormat component, which is part of this
component library: http://code.google.com/p/gc-tapestry-components/.
It has the disadvantage of providing a specific function, as opposed to
Output/OutputL
you could add you own binding prefix
${date:lastLoginDate}
or
${date:lastLoginDate}
http://wiki.apache.org/tapestry/Tapestry5HowToAddBindingPrefix
Davor Hrg
On Dec 13, 2007 7:17 AM, Liu Dapeng <[EMAIL PROTECTED]> wrote:
> hi guys
>
> i am using expansion to output a Date object like
>
>
>
Hi Dapeng,
OutputLocale
http://wiki.apache.org/tapestry/Tapestry5OutputLocaleNumber
Marcus
Hi Dapeng,
Consider adding the message format binding prefix to your application.
http://wiki.apache.org/tapestry/Tapestry5HowToAddMessageFormatBindingPrefix
It does what you want and it's easy to localize the date format.
-Filip
Dapeng skrev:
hi guys
i am using expansion to output a Date o
hi guys
i am using expansion to output a Date object like
Your last login: ${lastLoginDate}
but how to format it ?? currently it gives the whole string as Wed
Dec 12 18:36:38 SGT 2007
how to change it to like dd/mm/???
regards
MAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>
--
View this message in context:
http://www.nabble.com/-T5--How-to-format-java.lang.Date-when-using-expansion-tp14312035p14312705.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
-
Try the Output component, eg.
with some extra java for the format:
private DateFormat _dateViewFormat = new SimpleDateFormat("dd/MM/
");
public DateFormat getDateViewFormat() {
return _dateViewFormat;
}
Cheers,
Geoff
On 13/12/2007, at 7:38 PM,
hi guys
i am using expansion to output a Date object like
Your last login: ${lastLoginDate}
but how to format it ?? currently it gives the whole string as Wed Dec
12 18:36:38 SGT 2007
how to change it to like dd/mm/???
regards
---