Author: akushunin
Date: 2007-07-30 04:17:33 -0400 (Mon, 30 Jul 2007)
New Revision: 1914
Modified:
trunk/sandbox/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
Log:
added pattern and Locale selection for default DateTime converter
Modified:
trunk/sandbox/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java
===================================================================
---
trunk/sandbox/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2007-07-29
17:12:03 UTC (rev 1913)
+++
trunk/sandbox/ui/calendar/src/main/java/org/richfaces/renderkit/CalendarRendererBase.java 2007-07-30
08:17:33 UTC (rev 1914)
@@ -214,12 +214,16 @@
writer.write(definition.toScript());
}
- public String getInputValue(FacesContext context, UIInput component){
- UIInput input = (UIInput) component;
+ public String getInputValue(FacesContext context, UIComponent component){
+ // UIInput input = (UIInput) component;
+ UICalendar input = (UICalendar) component;
String value = (String) input.getSubmittedValue();
if(value == null){
Object curVal = input.getValue();
- Converter converter = new DateTimeConverter();
+ DateTimeConverter converter = new DateTimeConverter();
+ converter.setPattern(input.getDatePattern());
+ converter.setLocale(input.getLocale());
+ converter.setTimeZone(input.getTimeZone());
// Converter converter = SelectUtils.getConverterForProperty(context, input,
"value");
if(converter != null){
Show replies by date