Sun Java Studio Creator 2 – Online Help
 

Radio Button Group Component

See Also | Tutorials

You can drag the Radio Button Group component radio button group icon from the Palette's Basic category to the Visual Designer to create a table initially containing 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. For example, if you want the radio buttons laid out in a single row, set 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.rave.web.ui.model.Option objects that populate the list. Right-click the component and choose Bind to Data to set this property, as described below.

In the Outline window, 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, as described below.

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, as described below.

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

See Also
Binding Component Properties
Working With Components
Component Tasks: Quick Reference
Component Web Tutorials
Data Source Web Tutorials
About the Palette
Tutorials
Delving Into Components Tutorial
Using Listbox Components
Using Virtual Forms
 
 
 
Legal Notices. Copyright © 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Close