On Jan 26, 2008 4:19 AM, Mathias P.W Nilsson <[EMAIL PROTECTED]> wrote:
>
> Thanks but it still does not work. I have set the setIsNullValid to true and
> overrided the getDefaultChoice
>
>  @Override
> protected java.lang.CharSequence getDefaultChoice(final Object selected){
>      return "Test value";
> }
>
> But what happens then is that the null value is removed from the list. I
> would like to have an option with id "" and a value of my choice in top.

Make that something like:

        @Override
        protected CharSequence getDefaultChoice(Object selected)
        {
                return "<option value=\"\">This is the null choice</option>";
        }

If you would look at the source that Wicket spits out of your earlier
attempt, you'll see that "Test value" is actually printed, but as it
is not printed as an option, it is ignored (and is invalid even).

Eelco

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

Reply via email to