Issue Details (XML | Word | Printable)

Key: MILYN-54
Type: Wish Wish
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Daniel Bevenius
Reporter: Pavel Kadlec
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Milyn

Be able to configure locale in CalendarDecoder

Created: 14/Sep/07 06:53 AM   Updated: 02/Mar/08 12:21 PM
Component/s: Smooks Javabean
Affects Version/s: Smooks v0.9
Fix Version/s: Smooks v1.0

Time Tracking:
Not Specified

File Attachments: 1. Java Source File MyCalendarDecoder.java (2 kB)



 Description  « Hide
To add ability to configure locale in CalendarDecoder

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Tom Fennelly added a comment - 14/Sep/07 07:01 AM - edited
Pavel, you may already have figured this out yourself, but you can work around this in the short term by implementing your own decoder impl (a modified version of CalendarDecoder perhaps) and specifying it manually in the config. If you do this, please contribute back a patch.

Pavel Kadlec added a comment - 17/Sep/07 05:48 AM
I have created my own calendar decoder called MyCalendarDecoder. Unfortunatelly I was not able to reuse any code from CalendarDecoder because fields "format" and "decoder" are private (I would need that field to be protected). So I have used "copy and paste" style.

Tom Fennelly added a comment - 17/Sep/07 05:57 AM
That's great Pavel. Thanks.

Will get this into the main codeline ASAP.


Daniel Bevenius added a comment - 26/Nov/07 01:55 PM
Committed revision 422.

Added languageCode and country code as optional configuration parameters.


Tom Fennelly added a comment - 27/Nov/07 04:09 AM
Sorry Dan... there's a TimeZone issue with the test on this. Setting the Locale doesn't effect the TimeZone... it still comes back as the local TimeZone, causing the test to fail for me (coz I'm GMT and not CET).

Daniel Bevenius added a comment - 17/Dec/07 07:33 AM
Committed revision 432.

Daniel Bevenius added a comment - 17/Dec/07 07:36 AM
done

Daniel Bevenius added a comment - 02/Mar/08 06:49 AM
Reopening this as I suspect a bug.

Daniel Bevenius added a comment - 02/Mar/08 12:21 PM
Committed with revsion : 513

Updated the tests, I hade created an invalid locale previously which just happened to let the test pass.
I've modified the test case with a proper locale now.
Also refactored the Decoders a little so that DateDecoder can also be specified with a locale