[
https://issues.apache.org/jira/browse/WICKET-2341?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Keith R. Bennett updated WICKET-2341:
-------------------------------------
Attachment: wicket-2341.patch
This patch makes the changes suggested, relative to the 1.4 file.
> AbstractSingleSelectChoice nullValid javadocs are misleading.
> -------------------------------------------------------------
>
> Key: WICKET-2341
> URL: https://issues.apache.org/jira/browse/WICKET-2341
> Project: Wicket
> Issue Type: Bug
> Components: wicket
> Affects Versions: 1.4-RC4
> Environment: Any
> Reporter: Keith R. Bennett
> Priority: Minor
> Attachments: wicket-2341.patch
>
> Original Estimate: 1h
> Remaining Estimate: 1h
>
> I believe that the documentation on AbstractSelectSingleChoice regarding
> nullValid is misleading. This documentation appears in isNullValid()
> and setNullValid(). I think the following is more accurate and informative:
> ----
> Determines whether or not the null value should be included in the
> list of choices when the field's model value is nonnull, and whether or
> not the null_valid string property (e.g. "Choose One") should be
> displayed until a nonnull value is selected.
> If set to false, then "Choose One" will be displayed when the value is
> null. After a value is selected, and that change is propagated to the
> underlying model, the user will no longer see the "Choose One" option,
> and there will be no way to reselect null as the value.
> If set to true, the null string property (the empty string, by default)
> will always be displayed as an option, whether or not a nonnull value
> has ever been selected.
> Note that this setting has no effect on validation; in order to guarantee
> that a value will be specified on form validation, call setRequired(true).
> This is because even if setNullValid() is called with false, the user can
> fail to provide a value simply by never activating (i.e. clicking on) the
> component.
> ----
> For the nullValid data member, I suggest this comment:
> "whether or not null will be offered as a choice once a nonnull value is
> saved"
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.