You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Eelco Hillenius (JIRA)" <ji...@apache.org> on 2007/06/24 19:29:26 UTC
[jira] Assigned: (WICKET-688) DatePicker doesn't work with
TextField
[ https://issues.apache.org/jira/browse/WICKET-688?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Eelco Hillenius reassigned WICKET-688:
--------------------------------------
Assignee: Eelco Hillenius
> DatePicker doesn't work with TextField
> --------------------------------------
>
> Key: WICKET-688
> URL: https://issues.apache.org/jira/browse/WICKET-688
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.0-beta1
> Reporter: Kent Tong
> Assignee: Eelco Hillenius
>
> 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)
> {
> converter = component.getConverter(Date.class);
> }
> 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)");
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.