rich:calendar converter bug
---------------------------
Key: RF-3850
URL:
http://jira.jboss.com/jira/browse/RF-3850
Project: RichFaces
Issue Type: Bug
Affects Versions: 3.2.1
Environment: Running richfaces 3.2.1GA with facelets 1.1.13 and seam 2.0.1
Reporter: Tim Evers
The following code worked under richfaces 3.2.0 but not under 3.2.1GA
<rich:calendar id="postingDate"
inputStyle="width:80px"
value="#{LedgerFilterDataBean.postingDate}"
datePattern="dd/MM/yyyy"
converter="GekkoDateConverter"
/>
The value expression binds to a variable of type GekkoDate (our own custom date type)
The code that fails under 3.2.1GA is
public String getAsString(FacesContext context,
UIComponent component,
Object value)
{
if (value == null) {
return "";
}
try {
return DateFormatUtils.formatDate((GekkoDate) value,
getDateFormat(component));
} catch (ConverterException e) {
throw new ConverterException(MessageFactory.getMessage(context,
STRING_ID, value, MessageFactory.getLabel(context, component)),
e);
}
}
The reason it fails is that under 3.2.1GA sometimes the parameter (Object value) is not of
type GekkoDate. It is of type java.util.date.
Somehow in the change from 3.2.0 to 3.2.1GA the support for custom date types has been
broken.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira