WTUI Docs

WTUI  1.0.0

WTUI Docs > WTUI > WTUI.RadioGroupControl
Search:
 
Filters

Class WTUI.RadioGroupControl

A Radio Group Control

Tag

<wtui:control type="WTUI.RadioGroupControl"/>

The tag for WTUI.RadioGroupControl

Example:

<wtui:control type="WTUI.RadioGroupControl" id="exampleid">
  <wtui:option value="1">One</wtui:option>
  <wtui:option value="2">Two</wtui:option>
</wtui:control>
Parameters:
id <String> (optional) The id of the radio group control
name <String> (optional) The name of the control if it is used within a form
options <String> (optional) A JSON encoded array of options
value <String> (optional) The value of the control

Methods

getValue

String getValue ( )

Get the value

Returns: String
The value of the control

setValue

void setValue ( value )

Set the value

Parameters:
value <String> The value
Returns: void

Events

change

change ( value )
Fired when the value of the radiobutton group changes

Example:
WTUIComponent('radiogroupid').on('change', function(value) {
  alert('radio group value changed');
}
Parameters:
value <String> The new value of the control

click

click ( value )
Fired when a radiobutton in the group is clicked

Example:
WTUIComponent('radiogroupid').on('click', function(value) {
  alert('radiobutton clicked:' + value);
}
Parameters:
value <String> The value of the radiobutton clicked

WTUI