You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Alastair Maw (JIRA)" <ji...@apache.org> on 2007/06/04 21:34:26 UTC
[jira] Updated: (WICKET-500)
org.apache.wicket.extensions.yui.calendar.DateField; throws NPE upon
validation.
[ https://issues.apache.org/jira/browse/WICKET-500?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Alastair Maw updated WICKET-500:
--------------------------------
Fix Version/s: 1.3.0-rc1
> org.apache.wicket.extensions.yui.calendar.DateField; throws NPE upon validation.
> --------------------------------------------------------------------------------
>
> Key: WICKET-500
> URL: https://issues.apache.org/jira/browse/WICKET-500
> Project: Wicket
> Issue Type: Bug
> Environment: URL: https://svn.apache.org/repos/asf/incubator/wicket/trunk/jdk-1.4/wicket-datetime
> Revision: 532322
> Reporter: Martin Funk
> Assignee: Eelco Hillenius
> Fix For: 1.3.0-rc1
>
>
> org.apache.wicket.extensions.yui.calendar.DateField; throws NPE upon validation.
> The situation:
> markup:
> <span wicket:id="arrivalDateProperty" id="arrivalDateProperty"
> type="text" size="15"></span>
> the code:
> final DateField arrivalDatePropertyTextField = new DateField(
> "arrivalDateProperty");
> arrivalDatePropertyTextField.add(DateValidator
> .minimum(new DateMidnight().toDate()));
> add(arrivalDatePropertyTextField);
> the generated markup:
> <span id="arrivalDateProperty" name="arrivalDateProperty" type="text" size="15">
> <span style="white-space: nowrap;">
> <input id="date0" name="arrivalDateProperty:date" value="25.04.07" type="text" size="8"/>
> <span> <div style="display:none;z-index: 99999;position:absolute;" id="date0Dp"></div><img style="cursor: pointer; border: none;" id="date0Icon" src="resources/org.apache.wicket.extensions.yui.calendar.DatePicker/icon1.gif" /></span><input type="hidden"/>
> </span>
> </span>
> The stacktrace
> DateConverter.convertToObject(String, Locale) line: 37
> DateField(FormComponent).convert() line: 803
> Form$13.validate(FormComponent) line: 1051
> [...]
> shows that DateField 's convert() is called, which in this situation is looking for the parameter "arrivalDateProperty" whereas it probably should look for the parameter "arrivalDateProperty:date"
> Probably its DateTextField value should be validated.
> My first shot would be delegating the the DateField 's convert() method to its DateTextField ' s convert() method,
> but maybe the wicket way is different.
> mf
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.