| Author |
Format a date represented as a String to another String representation
|
Fredrik Larsback
Greenhorn
Joined: Dec 21, 2009
Posts: 9
|
|
How do I format a date string to a string with another format with JSF?
E.g.
Format "20100224091007.000000Z" to "2010-02-24 09:10:07"
Regards
/Fredrik
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14572
|
|
|
What are you expecting JSF to do? Your example is just free-floating data without any context. You're describing a process that can be done without JSF or even any web application at all.
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
Fredrik Larsback
Greenhorn
Joined: Dec 21, 2009
Posts: 9
|
|
Tim Holloway wrote:What are you expecting JSF to do? Your example is just free-floating data without any context. You're describing a process that can be done without JSF or even any web application at all.
I have a Seam application which reads a date as a string from a backing bean which is packaged in a jar which can't be modified. I'd like to know if there is way to format this date-String to another format in my .xhtml page through some tag library like <f:convertDateTime> or should a write my own facelet tag library to achive this?
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14572
|
|
|
I believe that's within the capabilities of the JSF Converter architecture. A Converter basically has 2 methods in it (inbound and outbound conversions), and is typically registered in the faces-config file, where you bind the actual converter class to a logical converter name for use in converter tags.
|
 |
Fredrik Larsback
Greenhorn
Joined: Dec 21, 2009
Posts: 9
|
|
Tim Holloway wrote:I believe that's within the capabilities of the JSF Converter architecture. A Converter basically has 2 methods in it (inbound and outbound conversions), and is typically registered in the faces-config file, where you bind the actual converter class to a logical converter name for use in converter tags.
Ok, thanks. Then I'll write a converter.
|
 |
 |
|
|
subject: Format a date represented as a String to another String representation
|
|
|