Radio"

From Documentation
m
m ((via JWB))
 
(15 intermediate revisions by 4 users not shown)
Line 1: Line 1:
 
{{ZKComponentReferencePageHeader}}
 
{{ZKComponentReferencePageHeader}}
  
= (Your Component Name) =
+
= Radio =
  
*Demonstration:  
+
*Demonstration: [http://www.zkoss.org/zkdemo/input/radio_button Radio]
*Java API: <javadoc>org.zkoss.zul.XXX</javadoc>
+
*Java API: <javadoc>org.zkoss.zul.Radio</javadoc>
*JavaScript API: <javadoc directory="jsdoc">zul.YYY.XXX</javadoc>
+
*JavaScript API: <javadoc directory="jsdoc">zul.wgt.Radio</javadoc>
 +
*Style Guide: [[ZK_Style_Guide/XUL_Component_Specification/Radio | Radio]]
  
 
= Employment/Purpose =
 
= Employment/Purpose =
  
 
+
A <code>radio</code> button is a component that can be turned on and off. Radio buttons are grouped together in a group, called <code>radiogroup</code>. Only one radio button with the same group may be selected at a time.
  
 
= Example =
 
= Example =
  
 +
[[Image:ZKComRef_radio.png]]
  
 +
<source lang="xml" >
 +
    <vlayout>
 +
        <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"/>
 +
    </vlayout>
 +
</source>
  
 +
=Supported Events=
  
 
+
{| class='wikitable' | width="100%"
=Supported events=
 
 
 
{| border="1" | width="100%"
 
 
! <center>Name</center>
 
! <center>Name</center>
 
! <center>Event Type</center>
 
! <center>Event Type</center>
Line 26: Line 37:
 
| None
 
| None
 
|}
 
|}
 +
*Inherited Supported Events: [[ZK_Component_Reference/Input/Checkbox#Supported_Events | Checkbox]]
  
 
=Supported Children=
 
=Supported Children=
  
  *ALL
+
  *NONE
  
=Use cases=
+
=Use Cases=
  
{| border='1px' | width="100%"
+
{| class='wikitable' | width="100%"
 
! Version !! Description !! Example Location
 
! Version !! Description !! Example Location
 
|-
 
|-
| 5.0+
+
| 3.6
| &nbsp;
+
| Radio buttons with Listitems
| &nbsp;
+
| [http://www.zkoss.org/forum/listComment/3867 http://www.zkoss.org/forum/listComment/3867]
 +
|-
 +
| 3.6
 +
| Radiogroup radio's in seperate table/grid rows
 +
| [http://www.zkoss.org/forum/listComment/9002 http://www.zkoss.org/forum/listComment/9002]
 
|}
 
|}
 +
 +
See also: [[ZK_Component_Reference/Input/Radiogroup#Use_Cases | Radiogroup]]
  
 
=Version History=
 
=Version History=
 
+
{{LastUpdated}}
{| border='1px' | width="100%"
+
{| class='wikitable' | width="100%"
 
! Version !! Date !! Content
 
! Version !! Date !! Content
 
|-
 
|-
| 5.x.x
+
| &nbsp;
| x/x/20xx
+
| &nbsp;
| Initialization
+
| &nbsp;
 
|}
 
|}
  
 
{{ZKComponentReferencePageFooter}}
 
{{ZKComponentReferencePageFooter}}

Latest revision as of 10:42, 12 January 2022

Radio

Employment/Purpose

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.

Example

ZKComRef radio.png

    <vlayout>
        <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"/>
    </vlayout>

Supported Events

Name
Event Type
None None

Supported Children

*NONE

Use Cases

Version Description Example Location
3.6 Radio buttons with Listitems http://www.zkoss.org/forum/listComment/3867
3.6 Radiogroup radio's in seperate table/grid rows http://www.zkoss.org/forum/listComment/9002

See also: Radiogroup

Version History

Last Update : 2022/01/12


Version Date Content
     



Last Update : 2022/01/12

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.