You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@wicket.apache.org by Nick Pratt <nb...@gmail.com> on 2012/11/14 23:35:45 UTC

DropDownChoice.setNullValid

public List<String> choices = Arrays.asList(null,"RENDER","ENABLE");
DropDownChoice<String> defaultPerm = new DropDownChoice<>( "perm",
permModel, choices );
defaultPerm.setNullValid( true );

When this renders, I see a select box with 4 options - 2 blanks, and the
two text options.
I expected to only see three - a blank (null) and the two text options.

Is this expected behavior? (Wicket 6.2)


Nick

Re: DropDownChoice.setNullValid

Posted by Paul BorČ™ <pa...@bors.ws>.
Are you confusing nullValid w/ nullAllowed?

~ Thank you,
   Paul Bors

On Nov 14, 2012, at 5:43 PM, Nick Pratt <nb...@gmail.com> wrote:

> As a followup - if you dont pass the null in the choices list, then it
> works as expected.
> 
> 
> On Wed, Nov 14, 2012 at 5:35 PM, Nick Pratt <nb...@gmail.com> wrote:
> 
>> public List<String> choices = Arrays.asList(null,"RENDER","ENABLE");
>> DropDownChoice<String> defaultPerm = new DropDownChoice<>( "perm",
>> permModel, choices );
>> defaultPerm.setNullValid( true );
>> 
>> When this renders, I see a select box with 4 options - 2 blanks, and the
>> two text options.
>> I expected to only see three - a blank (null) and the two text options.
>> 
>> Is this expected behavior? (Wicket 6.2)
>> 
>> 
>> Nick
>> 

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@wicket.apache.org
For additional commands, e-mail: users-help@wicket.apache.org


Re: DropDownChoice.setNullValid

Posted by Nick Pratt <nb...@gmail.com>.
As a followup - if you dont pass the null in the choices list, then it
works as expected.


On Wed, Nov 14, 2012 at 5:35 PM, Nick Pratt <nb...@gmail.com> wrote:

> public List<String> choices = Arrays.asList(null,"RENDER","ENABLE");
> DropDownChoice<String> defaultPerm = new DropDownChoice<>( "perm",
> permModel, choices );
> defaultPerm.setNullValid( true );
>
> When this renders, I see a select box with 4 options - 2 blanks, and the
> two text options.
> I expected to only see three - a blank (null) and the two text options.
>
> Is this expected behavior? (Wicket 6.2)
>
>
> Nick
>