You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Igor Vaynberg (JIRA)" <ji...@apache.org> on 2007/08/31 07:16:30 UTC
[jira] Commented: (WICKET-635) FormTester Does Not Properly Handle
DropDownChoice With Null Model
[ https://issues.apache.org/jira/browse/WICKET-635?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12524005 ]
Igor Vaynberg commented on WICKET-635:
--------------------------------------
where does -1 come from? fc.getvalue() is final and afict it will return "" not -1 if modelobject is null
> FormTester Does Not Properly Handle DropDownChoice With Null Model
> ------------------------------------------------------------------
>
> Key: WICKET-635
> URL: https://issues.apache.org/jira/browse/WICKET-635
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.3.0-beta1
> Reporter: Gerry Lowe
> Fix For: 1.3.0-beta4
>
>
> See this thread: <http://www.nabble.com/FormTester%2C-DropDownChoice---Validation-tf3884382.html#a11009710>.
> The FormTester constructor contains a code block like:
> -----------------------------------------------------------------------------------------------------------------------
> else if ((formComponent instanceof DropDownChoice) || (formComponent instanceof RadioChoice) || (formComponent instanceof CheckBox)) {
> setFormComponentValue(formComponent, formComponent.getValue());
> }
> This means that a DropDownChoice with a null model (i.e.. no selection) gets a post value of "-1", instead of "" (empty string).
> This in turn means that it incorrectly passes a "required" validation check.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.