Igor -
Done:
https://issues.apache.org/jira/browse/WICKET-2341Thanks for your support.
- Keith
-----Original Message-----
From: Igor Vaynberg [mailto:
igor.vaynberg@...]
Sent: mercredi 24 juin 2009 12:59
To:
dev@...
Subject: Re: Hello, and setNullValid Docs Question
looks great keith, definetely open a jira issue so we dont lose this.
-igor
On Wed, Jun 24, 2009 at 9:52 AM, Keith Bennett<
kbennett22@...> wrote:
> Hi, everyone. This is my first time posting to this list. I'm a
> committer on another Apache project, Tika, though I've been inactive
> there for a while. I'm currently using Wicket heavily and would like to
> be helpful here as well.
>
> I found something in the docs that was confusing to me. I haven't been
> able to download the new RC, but I'm pretty sure it wasn't addressed
> because I didn't find anything in Jira about it.
>
> In the docs for AbstractSingleSelectChoice<T> setNullValid it says:
>
>> setNullValid
>> public AbstractSingleSelectChoice<T> setNullValid(boolean nullValid)
>> Is the null value a valid value? If it is, it means that the
>> null value will be displayed, typically to the user as 'choose
>> one' or something similar. Note that this doesn't say anything
>> about whether a null value (not selecting a value) is
>> permitted; use FormComponent.setRequired(boolean) for that.
>>
>>
>
> In the docs for AbstractSingleSelectChoice<T> setNullValid it says:
> I think this is misleading. I've written an alternate comment below.
> Please let me know if my understanding is correct, and if you'd like me
> to file an issue in Jira about it:
>
> ---
>
> 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.
>
> ----
>
> Thanks,
> Keith Bennett
>
>