-
Dec 8th, 2010, 09:20 PM
#11
Ok, let's be more specific (not summarized, I guess).
I use formatter/validator annotations, and want the @DateTimeFormat to do the job for dates, enforcing the correct format when parsing, and printing the very same format when populating inputs, without the boring task of setting <fmt:formatDate> for each field. The same applies to BigDecimal fields.
My app have no multilanguage support right now, but it may be added someday, so I'd like to keep it flexible enough to avoid rework in the furure. So I don't want to hardcode date/number patterns everywhere in my code. I want to keep formatting/parsing up to the locale, so that new formats can be supported instantly.
The question is that my locale uses dd/mm/yy as date format and I need dd/mm/yyyy, and numbers are 0.000,0 , and I need 0,00 (no group separators, two decimal digits if monetary).
That's what I need, and I don't know how to do it. I don't mind "overriding" the default patterns used by my locale (with custom classes and/or XML config), if that's the way to go... as long as this fix reflects everywhere.
Thanks, Keith!
Last edited by mdrg; Dec 8th, 2010 at 09:23 PM.
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules