JSF 1.2 Radio Button Group Component

See Also | Tutorials

The Radio Button Group component radio button group icon provides a group of radio buttons that operate together—selecting one button deselects the others. The group is implemented as a table that intially contains three radio buttons in a column.

The radio buttons are rendered in rows and columns in an HTML <table> element. The number of rows is defined by the number of radio buttons. The number of columns is defined by the columns property. The default layout is a single vertical column. If you want the radio buttons laid out in a single row, set the columns property to the number of radio buttons.

A group of radio buttons can be used to represent various types of data, such as:

The items property associates the component with an array, a collection, or a list of com.sun.webui.jsf.model.Option objects that populate the list. Right-click the component and choose Bind to Data to set this property.

In the   you can see the default object that populates the list, which has a name similar to radioButtonGroup1DefaultOptions. A quick way to change the default list items is to edit this object by right-clicking the component and choosing Configure Default Options.

You set the selected property to associate the component with an object that picks up the item selected by the user. The first time the component is rendered, the option that corresponds to the value of the selected property, if any, is marked as selected. When the user selects a radio button, the component's selected property contains the selected value. Right-click the component and choose Property Bindings to set this property.

After dragging the component to the Visual Designer, you can do a number of things with it:

See Also
Radio Button Group Properties window
Binding Component Properties
Working With Components
Component Tasks: Quick Reference
About the Visual Web Palette
Tutorials

Legal Notices