rich:calendar backed by String not using custom converter
---------------------------------------------------------
Key: RF-9482
URL:
https://jira.jboss.org/browse/RF-9482
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: component
Affects Versions: 3.3.3.Final
Environment: Found in RichFaces 3.3.3Final
Reporter: Nicola Jones
When a rich:calendar is backed by a String property and has a custom converter to change
the date pattern of the String to & from a user locale specific pattern, it fails to
use the converter when determining or setting the current date.
datePattern set on the rich:calendar is a user specific format read from properties.
HtmlCalendar getCurrentDate returns the unconverted form property value i.e. not in the
user's format.
UICalendar then calls getAsDate(currentDate) which detects that the value is a String and
not a Date and attempts to convert it to a Date:
if (date instanceof String) {
DateTimeConverter converter = new DateTimeConverter();
converter.setPattern(this.getDatePattern());
this results in an exception because it's using the date pattern for the calendar
which is different to the unconverted format of the current date.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira