Richfaces UICalendar doesn't obey String->String converter
----------------------------------------------------------
Key: RF-9016
URL:
https://jira.jboss.org/browse/RF-9016
Project: RichFaces
Issue Type: Bug
Security Level: Public (Everyone can see)
Affects Versions: 3.3.2.SR1
Reporter: Gergely Nagy
We have a use case where the model has dates in the ISO 8601 format as Strings, but we
want to use a different date pattern in richfaces calendar. The current implementation of
UICalendar.getAsDate() short-circuits conversion if it detects that the value is String in
the model.
The expected behavior would be to first check if there is a converter, use it, and only
then try to be smart about value type.
Our current workaround is to extend HtmlCalendar and override this method as such:
public Date getAsDate(Object date) {
Converter converter = getConverter();
if(converter != null) {
FacesContext context = FacesContext.getCurrentInstance();
return super.getAsDate(converter.getAsString(context, this, date));
}
return super.getAsDate(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