
1.5.6
Inspector
Session: 857 bytes
Page: 11.6K
A ListChoice component lets users select a single value from a scrollable list.
<select wicket:id="site">
<option>site 1</option>
<option>site 2</option>
</select>
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);