Author: abelevich
Date: 2011-01-20 09:21:27 -0500 (Thu, 20 Jan 2011)
New Revision: 21116
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
Log:
RF-10172 r:calendar : use logical "javax.faces.DateTime" as default converter
Modified:
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
---
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2011-01-20
13:48:30 UTC (rev 21115)
+++
trunk/ui/input/ui/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2011-01-20
14:21:27 UTC (rev 21116)
@@ -202,7 +202,7 @@
// in case the converter hasn't been set, try to use default
// DateTimeConverter
if (converter == null) {
- converter = createDefaultConverter();
+ converter = createDefaultConverter(facesContext);
}
setupConverter(facesContext, converter, calendar);
@@ -222,7 +222,7 @@
Converter converter = SelectUtils.findConverter(facesContext, calendar,
"value");
if (converter == null) {
- converter = createDefaultConverter();
+ converter = createDefaultConverter(facesContext);
}
setupConverter(facesContext, converter, calendar);
@@ -535,8 +535,11 @@
return (label == null || ((String)label).trim().length() == 0);
}
- protected Converter createDefaultConverter() {
- return new DateTimeConverter();
+ protected Converter createDefaultConverter(FacesContext facesContext) {
+ if (facesContext == null) {
+ return null;
+ }
+ return
facesContext.getApplication().createConverter(DateTimeConverter.CONVERTER_ID);
}
protected Converter setupConverter(FacesContext facesContext, Converter converter,
AbstractCalendar calendar) {
Show replies by date