You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by "Gerry Lowe (JIRA)" <ji...@apache.org> on 2007/06/11 10:46:27 UTC

[jira] Created: (WICKET-635) FormTester Does Not Properly Handle DropDownChoice With Null Model

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


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.