Provides a twin multiple Select box control to select items. The values of the
PickList
are provided by
Option
objects like for a
Select
.
PickList Examples
The following code shows the previous rendering example:
PickList pickList = new PickList("languages"); pickList.setHeaderLabel("Languages", "Selected"); pickList.add(new Option("001", "Java")); pickList.add(new Option("002", "Ruby")); pickList.add(new Option("003", "Perl")); pickList.addSelectedValue("001");
The selected values can be retrieved from {@link #getSelectedValues()}.
Set selectedValues = pickList.getSelectedValues(); for (Iterator i = selectedValues.iterator(); i.hasNext();){ String value = (String) i.next(); ... }
CSS and JavaScript resources
The PickList control makes use of the following resources (which Click automatically deploys to the application directory,
/click):
To import these CheckList files simply reference the variables
$headElements and
$jsElements in the page template.