Details
-
Type: New Feature
-
Status: Closed
-
Priority: Major
-
Resolution: Fixed
-
Affects Version/s: 3.0
-
Component/s: ACE-Components
-
Labels:None
-
Environment:ACE 3.x
-
Assignee Priority:P2
-
Workaround Exists:Yes
-
Workaround Description:In the application, take the DateFormatSymbols and populate your .xhtml file with the javascript localisation strings manually for each locale that you support.
Description
When our dateTimeEntry component was YUI based and more rendered from the server, we had the ability to support any localisation that Java supports, automatically, as of ICE-6081. Since transitioning to basing dateTimeEntry off of jQuery, with it's rendering being done client side in javascript, we've used a model where the localisation is up to the application, as demonstrated in dateTimeEntry-locale-tutorial.
It would be good to provide a means to hook into the faces-config.xml supported-locale and default-locale entries, and provide a means of populating the javascript locale structures based off of the Java server DateFormatSymbols.
One necessity is that f:convertDateTime will take the client provided date string and pass it to a DateTimeConverter, which will use all of the Java in-built localisation strings, and cause conversion errors if the given string doesn't match the in-built strings. So it makes sense to make it use what it expects, and not encourage arbitrary strings from applications.
It would be good to provide a means to hook into the faces-config.xml supported-locale and default-locale entries, and provide a means of populating the javascript locale structures based off of the Java server DateFormatSymbols.
One necessity is that f:convertDateTime will take the client provided date string and pass it to a DateTimeConverter, which will use all of the Java in-built localisation strings, and cause conversion errors if the given string doesn't match the in-built strings. So it makes sense to make it use what it expects, and not encourage arbitrary strings from applications.
Done. See screenshot-01.png, screenshot-02.png, screenshot-03.png.
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\resources\icefaces.ace\datetimeentry\datetimeentry.js#36979
M: C:\svn\ossrepo\icefaces3\trunk\icefaces\ace\component\src\org\icefaces\ace\component\datetimeentry\DateTimeEntryRenderer.java#36979