java.lang.Object
org.mortbay.html.Element
org.mortbay.html.Composite
org.mortbay.html.Block
org.mortbay.html.Select
- public class Select
- extends Block
HTML select Block.
| Fields inherited from class org.mortbay.html.Block |
Bold, Center, Div, Italic, Left, Listing, Plain, Pre, Quote, Right, Span, Xmp |
| Fields inherited from class org.mortbay.html.Element |
ALIGN, attributeMap, BGCOLOR, BOTTOM, CENTER, CLASS, COLOR, HEIGHT, ID, LEFT, MIDDLE, noAttributes, RIGHT, SIZE, STYLE, TOP, VALIGN, WIDTH |
| Methods inherited from class org.mortbay.html.Block |
write |
| Methods inherited from class org.mortbay.html.Element |
attribute, attribute, attribute, attributes, attributes, bgColor, bottom, center, color, cssClass, cssID, height, height, height, left, middle, right, setAttributesFrom, size, size, style, top, toString, width, width, width, write, write |
log
private static org.apache.commons.logging.Log log
Select
public Select(java.lang.String name,
boolean multiple)
Select
public Select(java.lang.String name,
boolean multiple,
java.lang.String[] options)
setSize
public Select setSize(int size)
- Set the number of options to display at once
add
public Select add(java.util.Enumeration e)
add
public Composite add(java.lang.Object o)
- Add option and specify if selected.
- Overrides:
add in class Composite
add
public Select add(java.lang.Object o,
boolean selected)
- Add option and specify if selected.
add
public Select add(java.lang.Object o,
boolean selected,
java.lang.String value)
- Add an option.
add
public Select add(java.lang.String[] arr,
int selected)
- Build a select from the given array of Strings. The values of the
select are the indexes into the array of the strings, which are used
as the labels on the selector.
add
public Select add(java.lang.String[] arr,
java.lang.String selected)
- Build a select from the given array of Strings. The values of the
select are the indexes into the array of the strings, which are used
as the labels on the selector.
bitsetFormResult
public static int bitsetFormResult(java.lang.String result)
- Utility function for multi-selectors.
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.