Radio

A radio button is a component that can be turned on and off. Radio buttons are grouped together in a group, called radiogroup. Only one radio button with the same group may be selected at a time.

<window title="Radiobox &amp; Radio Demo" >
<vbox>
<radiogroup onCheck="fruit.value = self.selectedItem.label">
<radio label="Apple"/>
<radio label="Orange"/>
<radio label="Banana"/>
</radiogroup>
You have selected :<label id="fruit" style="color:red"/>
</vbox>
</window>

Class Name

org.zkoss.zul.Radio

Supported Child Components

*NONE

Supported Events

Name

Event Type

onFocus

org.zkoss.zk.ui.event.Event

Description: Denotes when a component gets the focus.

onBlur

org.zkoss.zk.ui.even.Event

Description: Denotes when a component loses the focus.

onCheck

org.zkoss.zk.ui.event.CheckEvent

Description: Denotes when a component loses the focus.

Properties

Property

Description

Data Type

value

The String value denote this radio.

String

selected

The state of this radio.

boolean

Methods

Name

Description

Return Data Type

IsChildable

Determines whether it accepts child components

Note: No child is allowed.

Boolean

getInnerAttrs

Appends interior attributes for generating the HTML checkbox tag (the name, disabled and other attribute).

java.lang.String

getRadiogroup

Returns Radiogroup that this radio button belongs to.

Radiogroup

getName

Returns the name of this radio button.

java.lang.String

Inherited From