org.mortbay.html
public class Select extends Block
See Also: Block
Constructor Summary | |
---|---|
Select(String name, boolean multiple) | |
Select(String name, boolean multiple, String[] options) |
Method Summary | |
---|---|
Select | add(Enumeration e) |
Composite | add(Object o) Add option and specify if selected. |
Select | add(Object o, boolean selected) Add option and specify if selected. |
Select | add(Object o, boolean selected, String value) Add an option. |
Select | add(String[] arr, int selected) Build a select from the given array of Strings. |
Select | add(String[] arr, String selected) Build a select from the given array of Strings. |
static int | bitsetFormResult(String result) Utility function for multi-selectors.
|
Select | setSize(int size) Set the number of options to display at once |
Parameters: name Name of the form element multiple Whether multiple selections can be made
Parameters: name Name of the form element multiple Whether multiple selections can be made
Parameters: o The name of the option (displayed in the form) selected Whether the option is selected value The value of this option (returned in the form content)
Parameters: arr The array of strings for labels selected The index of the selected label, -1 for default
Parameters: arr The array of strings for labels selected The index of the selected label, -1 for default
This function takes the result returned by a multi-select input and produces an integer bit-set result of the selections made. It assumes the values of the multi-select are all different powers of 2.