Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
1.3.0-beta1
-
None
Description
DatePicker doesn't work with a TextField even though whose type has been set to java.util.Date. This is because when it tries to get a converter for DateTime.class, a DefaultConverter is returned instead of null. So it won't try to get a converter for Date.class:
protected void checkComponentProvidesDateFormat(Component component)
{
if (component instanceof ITextFormatProvider)
{ // were ok return; } IConverter converter = component.getConverter(DateTime.class);
if (converter == null)
if (converter instanceof DateConverter)
{ return; // This is ok } throw new WicketRuntimeException(
"this behavior can only be added to components that either implement "
+ ITextFormatProvider.class.getName() + " or that use "
+ DateConverter.class.getName() + " configured with an instance of "
+ SimpleDateFormat.class.getName()
+ " (like Wicket's default configuration has)");
}