Wicket Remove

wicket.markup.html.form.ListChoice

[back to the reference]

A ListChoice component lets users select a single value from a scrollable list.

Select your favorite site


Behind the Scenes

Example HTML

<select wicket:id="site">
<option>site 1</option>
<option>site 2</option>
</select>

Example Code

private static final List SITES = Arrays.asList(new String[] { "The Server Side", "Java Lobby", "Java.Net" });
...
    // Add a 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.
    ListChoice listChoice = new ListChoice("site", SITES);
    listChoice.setMaxRows(4);
    form.add(listChoice);

Further examples & and comments/explanations may be available in the source code.