RadioButton

Deprecation Warning! The content below is only applicable for use within deprecated 1.x versions of CA Agile Central's App SDK. Use of the component(s) and/or code on this page is not supported. To develop custom apps within our current environments, please see App SDK 2.0 documentation.

The RadioButton component provides an easy way to create a single stateful radio button and label within a table or another custom layout.

Same as getChecked; provides a consistent interface for retrieving the value of basic components

var checked = radioButton.getComponentValue();

setChecked

checked

Checks the radio button

radiobutton.setChecked(true);

setComponentValue

checked

Same as setChecked; provides a consistent interface for setting the value of basic components

radioButton.setComponentValue(true);

getValue

-

Returns the value as specified in the constructor config

var value = radiobutton.getValue();

getValidEvents

-

Returns an object containing the valid events for radio button

var events = radiobutton.getValidEvents();

Events

Events are used to notify consumers of a component when actions occur. The following methods are provided in order to interact with this component's events:

Method

Parameters

Description

Example

addEventListener

eventName*, listener*, scope

Registers the specified listener with the component's queue for the specified event and returns an object which can be used to remove the event listener later. The listener parameter should be a function with two parameters: 1) the component that fired the event; 2) an eventArgs object with properties specific to the event being fired. This function will be called by the component when the event occurs. If the optional scope parameter was specified the function will be called on that object (like scope.listener(sender, args);).

Returns an object with a property for each event name supported by the component. This is useful for passing as the first parameter to addEventListener().

var eventName = component.getValidEvents().onClick;

* = required parameter

The RadioButton component supports the following events:

Event Name

Description

Event Arguments

Example

onChange

Fired when the radio button is checked

The eventArgs object passed to any event listeners contains the following properties:value: The value of the radio button as specified in its constructor config.checked: true if the radio button is checked, false otherwise.