How to set value to default choice in Wicket DropDownChoice

Viewed 4622

I need to create a wicket dropdownchoice component, I can replace default "Choose One" text to "All" by set

nullValid=All
null=All

in its properties file. I also want to set the value of "All" to -1, but could not get it done.

<select>
<option selected="selected" value>All</option>
<option value="1">Not Started</option>
<option value="2">In Progress</option>
<option value="3">Complete</option>
</select>

what i want is

<select>
<option selected="selected" value="-1">All</option>
<option value="1">Not Started</option>
<option value="2">In Progress</option>
<option value="3">Complete</option>
</select>
2 Answers
Related