org.mortbay.html
Class Select
HTML select Block.
Bold , Center , Div , Italic , Left , Listing , Plain , Pre , Quote , Right , Span , Xmp |
ALIGN , BGCOLOR , BOTTOM , CENTER , CLASS , COLOR , HEIGHT , ID , LEFT , MIDDLE , RIGHT , SIZE , STYLE , TOP , VALIGN , WIDTH , attributeMap , noAttributes |
Select(String name, boolean multiple)
|
Select(String name, boolean multiple, String[] options)
|
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(arr[] , String selected) - Build a select from the given array of Strings.
|
Select | add(arr[] , int 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
|
attribute , attribute , attribute , attributes , attributes , bgColor , bottom , center , color , cssClass , cssID , height , height , height , left , middle , right , setAttributesFrom , size , size , size , style , toString , top , width , width , width , write , write , write |
Select
public Select(String name,
boolean multiple)
name
- Name of the form elementmultiple
- Whether multiple selections can be made
Select
public Select(String name,
boolean multiple,
String[] options)
name
- Name of the form elementmultiple
- Whether multiple selections can be made
add
public Select add(Enumeration e)
add
public Select add(Object o,
boolean selected)
Add option and specify if selected.
add
public Select add(Object o,
boolean selected,
String value)
Add an option.
o
- The name of the option (displayed in the form)selected
- Whether the option is selectedvalue
- The value of this option (returned in the form content)
add
public Select add(arr[] ,
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.
selected
- The index of the selected label, -1 for default
add
public Select add(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.
selected
- The index of the selected label, -1 for default
bitsetFormResult
public static int bitsetFormResult(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.
setSize
public Select setSize(int size)
Set the number of options to display at once
Copyright © 2004 Mortbay Consulting Pty. Ltd. All Rights Reserved.