Kaspar Fischer schrieb:
I am trying to get a DropDownChoice to select either a country or
the option "any country".

searchOptions.add(new DropDownChoice("search-country", countries, countriesRenderer)
     .setNullValid(true).setRequired(false)  // (*)
   );

With the second line (*) commented out, the drop-down menu initially
shows

   any country
   Belgium
   ...

Once I select Belgium and submit the form, the "any country" vanishes
forever. That's the what I expect.

... but: with the line (*), I have the behaviour I need, but instead of
"any country" I get an empty string:

   <empty string>
   Belgium
   ...

Meaning, the DropDownChoice does not pick up anymore my entry

  search-country.null=any country

Try
search-country.nullValid=any country

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to