wicket.markup.html.form.ListMultipleChoice
[back to the reference]A ListChoice component lets users select a multiple values from a scrollable list.
Behind the Scenes
Example HTML
<select wicket:id="sites">
<option>site 1</option>
<option>site 2</option>
</select>
<select wicket:id="choices">
<option>choice 1</option>
<option>choice 2</option>
</select>
Example Code
// Add a multiple list choice component that uses the model object's 'site'
// property to designate the current selection, and that uses the SITES
// list for the available options.
// Note that our model here holds a Collection, as we need to store
// multiple values too
ListMultipleChoice siteChoice = new ListMultipleChoice("sites", SITES);
form.add(siteChoice);
ListMultipleChoice manyChoice = new ListMultipleChoice("choices", MANY_CHOICES).setMaxRows(5);
form.add(manyChoice);