GroupOption Class
- public class GroupOption
extends Object
implements Serializable
GroupOption is a simple JavaBean that can be used to fully specify
the name, value, alt text and accesskey of either a CheckBoxGroup
or a RadioButtonGroup
. The name will appear in the HTML after
the checkbox or radio button. The name attribute is required for outpu
by the tags. The value can either be set separately or will default to
the name. Optionally and alt text attribute and accesskey value can be
provided.
-
Hierarchy
-
Object
GroupOption
-
All Implemented Interfaces
-
Serializable
Methods from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
GroupOption
public GroupOption()
- Default Constructor.
GroupOption
public GroupOption(String
name,
String
value,
String
alt,
String
accessKey)
- Construct a GroupOption setting all the values.
GroupOption
public GroupOption(String
name,
String
value)
- Construct a GroupOption setting the name and value.
GroupOption
public GroupOption(String
name)
- Construct a GroupOption setting the name.
getAccessKey() Method
public String
getAccessKey()
Get the accesskey of the option.
Returns
- The accessKey of the option.
getAlt() Method
public String
getAlt()
Get the alt text of the option.
Returns
- The alt text of the option.
getName() Method
public String
getName()
Get the name of the option.
Returns
- The name of the option that was set.
getValue() Method
public String
getValue()
Get the value of the option. If no value has been set
this method will return value assigned to the name
property.
Returns
- The value of the option.
setAccessKey(String) Method
public void setAccessKey(String
accessKey)
Set the alt text of the option.
Parameters
-
accessKey
- The value that will be set for the
accesskey
attribute.
setAlt(String) Method
public void setAlt(String
alt)
Set the alt text of the option.
Parameters
-
alt
- The text that will be set for the
alt
attribute.
setName(String) Method
public void setName(String
name)
Set the name of the option which will appear next to the option.
Parameters
-
name
- The name of the created option.
setValue(String) Method
public void setValue(String
value)
Set the value of the option. Thie value will be written out as
the value
attribute.
Parameters
-
value
- The name of the created option.