Radio Button
Article Metadata
Contents |
Inheritance
Nokia.RadioBox
|- Nokia.OptionBox
|- Nokia.Widget
|- Nokia.Class (basic class)
1 - Description
The Radio Button component enables the user to make a single selection within a group of vertically stacked, mutually exclusive radio buttoned text labels.
2 - Visual Design
3 - Component Dependencies
3.1 CSS
<!-- Themeroller CSS --> <link rel="stylesheet" href="themes/themeroller/<theme>/Themeroller.css" type="text/css" media="screen"> <!-- Specific Theme/Resolution CSS --> <link rel="stylesheet" href="/themes/nokia/ext-theme/<theme>/<resolution>/custom.css" type="text/css" media="screen">
3.2 Javascript
<!-- jQuery file --> <script src="/lib/jquery/jQuery.js" type="text/javascript" charset="utf-8"></script> <!-- Guarana file --> <script src="/lib/Guarana.js" type="text/javascript" charset="utf-8"></script>
4 - Functional Specifications/Requirements
4.1 - Options
- wrapper: String
- Wrapper element for the component.
4.2 - Events - Callbacks
- create: function()
- Scope: [this.element]
- check: function(event)
- Scope: [this.element]
- clearAll: function(event)
- Scope: [this.element]
4.3 - Methods
- check: function(event)
- Performs a check in a specific item.
- return [void]
- clearAll: function()
- Clears all items in the component. This method is used to set the component in its initial state.
- return [void]
4.4 - Default options
- wrapper: 'div'
- disableLabelSelection: true
5 - Component Demo
5.1 HTML
<div id="optiongroup"></div> <input type="radio" name="radio" value="" id="radio1" />
5.2 Javascript
var radio1 = new Nokia.RadioBox({
element: '#radio1',
label: 'testing radio 1',
wrapper: 'div',
create: function() {
//alert('Radiobox: Create');
},
check: function(event) {
//alert('Radiobox: Check', this, event);
},
uncheck: function(event) {
//alert('Radiobox: Uncheck', this, event);
},
push: function(event) {
//alert('Radiobox: Push', this, event);
},
clear: function(event) {
//alert('Radiobox: Clear', this, event);
}
});
var optionGroup = new Nokia.OptionGroup({
element: '#optiongroup',
title: 'Option Group 1'
});
optionGroup.addItem(radio1);
6 - Nokia WRT Browser Compatibility
| ▴ | S60 3.1 | S60 3.2 | S60 5.0 |
| Radio Button | NO | YES | YES |



(no comments yet)