Displays multiple buttons that can be selected or cleared.
Only one button in the group can be selected.
Category
Core Controls
Syntax
<xp:radioGroup attributes>content</xp:radioGroup>
Table 1. Embedded controlsControl |
Description |
selectItem |
Provides one item for user selection. |
selectItems |
Provides one or more items for user
selection. |
Table 2. Essential propertiesProperty |
Description |
id |
Defaults to radioGroup1, radioGroup2,
and so on. |
text |
Provides a label. |
value |
Binds the control to a data element
or other value. |
Table 3. All propertiesCategory |
Properties |
accessibility |
accesskey, legend, role, tabindex, title |
basics |
attrs, binding, dir, disabled, id, immediate, lang, loaded, readonly, rendered, rendererType, required |
data |
converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators,
showReadonlyAsDisabled, validator, validators, value, valueChangeListener, valueChangeListeners |
dojo |
dojoAttributes, dojoType |
events |
onblur, onchange, onclick, ondblclick, onfocus, onkeydown, onkeypress, onkeyup, onmousedown, onmousemove, onmouseout, onmouseover, onmouseup |
format |
border, layout |
styling |
disabledClass, disableTheme, enabledClass, style, styleClass, themeId |
Usage
At run time, one or more radio buttons
appear on the page. The user can select one button. When a button
is selected, any other button selected is cleared.
Examples
This Radio Button Group control presents
two items for selection.
<xp:radioGroup id="radioGroup1" value="#{document1.fruit}" layout="pageDirection">
<xp:selectItem itemLabel="Apples" itemValue="apples"></xp:selectItem>
<xp:selectItem itemLabel="Oranges" itemValue="oranges"></xp:selectItem>
</xp:radioGroup>
This Radio Button Group control
presents two items for selection using a formula.
<xp:radioGroup id="radioGroup1" value="#{document1.fruit}"
layout="pageDirection">
<xp:selectItems>
<xp:this.value>
<![CDATA[#{javascript:return new Array("Apples|apples", "Oranges|oranges")}]]>
</xp:this.value>
</xp:selectItems>
</xp:radioGroup>
This Check Box Group gets its
item selections from the values in a view column.
<xp:radioGroup id="radioGroup1" value="#{document1.fruit}"
layout="pageDirection">
<xp:selectItems>
<xp:this.value>
<![CDATA[#{javascript:var list = @DbColumn("", "fruits", 1);
return @Explode(list,",")}]]>
</xp:this.value>
</xp:selectItems>
</xp:radioGroup>