 |
Control API for Radio Button (radioButton)
A button that a user clicks to set an option. Unlike checkboxes, radio
buttons are mutually exclusive - selecting one radio button menu item
deselects all others in that group. That is also the reason why you cannot
define a radioButton by itself - it always has to be defined within a
radioButtonGroup.
- disabled
A boolean value that defines if the
radioButton is clickable. If the radioButton is disabled it is not selectable.
A disabled radioButton has a different background color for the radioButton
graphic and if the radioButton is checked the a different color for
the button mark.
- encode
A boolean value that defines how the
radioButton text is interpreted. HTML text formatting commands (e.g.
<h1>, <i> etc.) can be used to change the display of the
radioButton text. If there are no formatting commands in the radioButton
text string, the encode attribute has no effect.
Example
text="<h1><i>Important</i></h>
encode = "false"
the text string is rendered by interpreting the formatting commands.
Encode = "true" 
the formatting commands are displayed and not interpreted
- id
Identification name of the radioButton.
- key
A string which is assigned to the radioButton when the form
is sent to the server. A key string has be defined and must not be empty.
- text
Defines the string of text placed
right of the radiobutton graphic. If no text should be displayed an
empty string (null) can be used. See 'encode' for a formatting example
with embedded HTML commands.
- tooltip
Defines the hint of the radioButton
which is displayed as the mouse cursor passes over the radioButton,
or as the mouse button is pressed but not released.
| attribute |
req. |
values |
default |
case sens. |
JSP taglib |
classlib |
| disabled |
no |
TRUE
FALSE |
FALSE |
yes |
disabled="TRUE" |
setDisabled(true) |
| encode |
no |
TRUE
FALSE |
TRUE |
yes |
encode="FALSE" |
setEncode(false) |
| id |
yes |
String |
none |
yes |
id="GenderInfo" |
|
| key |
yes |
String |
none |
yes |
key="rb_k1" |
setKey("rb_k1") |
| text |
no |
String |
none |
no |
text="female" |
setText("female") |
| tooltip |
no |
String |
none |
no |
tooltip="I am
female" |
setTooltip("I
am female") |
Example
A radioButton has to be defined in a radioButtonGroup.
|