RadioButton control allows a user to select one option from a set of choices. In order to form a set of choices, multiple RadioButton widgets must be created and configured to work together.
Description | ||
new RadioButton(params?srcNodeRef?) |
Create a new RadioButton widget. |
Type | Description | |
_styleAttr | Object |
when you want to set style for other node. you can do this by example...
_styleAttr:{
|
active | Boolean |
If true, this forces the control to enter the active state and classname 'amos-form-active' will be added. |
busy | Boolean |
If true, this forces the control to enter the busy state and classname 'amos-form-busy' will be added. |
checked | Boolean |
A flag that shows whether a radio button is chosen (true) or not (false). |
disabled | Boolean |
If true, any control's events(except change) are not responding. Its content cannot be edited and is excluded when the form is submitted. |
error | Boolean |
If true, this forces the control to enter the error state and classname 'amos-form-error' will be added. |
filled | Boolean |
A flag that shows whether a form element is filled in (true) or empty (false). |
id | String |
An unique id for a radio button. (The specified value must be unique within the document.) |
label | String |
Label of value in radio button. |
name | String |
Name for a radio button. In order to form a set of choices from multiple radio buttons, all RadioButton widgets within this set must all have the same name. When sending a request to server, this property is the parameter's name. |
readOnly | Boolean |
If true, the control is read-only and cannot be edited. However, its content, if presents, is included in form submission. |
valid | Boolean |
Validity flag that shows whether a form element is validated to be valid (true) or invalid (false). |
value | String |
Value of the radio button. |
viewMode | Boolean |
If true, the control will show only the displayedValue. |
Return type | Description | |
__baseClassInherit(constructor) | None |
get className from superclass. |
hide(elem?) | None |
Hide a specified element. The hidden element will not be displayed at all. |
isValid() | Boolean |
Returns true when value validation succeeded; otherwise, false. |
isVisible(elem?) | Boolean |
Return true if the element is visible, otherwise false. |
reset() | None |
Reset all state and value to default. |
show(elem?) | None |
Display a specified element. |
toggle(elem?) | None |
Toggle visibility of a specified element. |
Description | ||
blur |
Fires when an object loses focus. |
|
change |
Fires when the value of an element has been changed. |
|
click |
Fires when the user clicks on an element. |
|
dblclick |
Fires when the user double-clicks on an element |
|
focus |
Fires when an element gets focus. |
|
keydown |
Fires when the user is pressing a key (on the keyboard). |
|
keypress |
Fires when the user presses a key (on the keyboard). |
|
keyup |
Fires when the user releases a key (on the keyboard). |
|
mousedown |
Fires when a user presses a mouse button over an element. |
|
mouseout |
Fires when the mouse pointer is moved out of an element. |
|
mouseover |
Fires when the mouse pointer is moved onto an element. |
|
mouseup |
Fires when a user releases a mouse button over an element. |
when you want to set style for other node. you can do this by example...
_styleAttr:{
style-property
:effected-node
}
this property was effected where this class was inherited and your widget was called by...
var widget = new YourWidget({
style:{
style-property
:style-value
}
});
now effected-node
in you widget will have style-property
= style-value
Default value: {}
If true, this forces the control to enter the active state and classname 'amos-form-active' will be added.
Default value: false
If true, this forces the control to enter the busy state and classname 'amos-form-busy' will be added.
Default value: false
A flag that shows whether a radio button is chosen (true) or not (false).
Default value: false
If true, any control's events(except change) are not responding. Its content cannot be edited and is excluded when the form is submitted.
Default value: false
If true, this forces the control to enter the error state and classname 'amos-form-error' will be added.
Default value: false
A flag that shows whether a form element is filled in (true) or empty (false).
Default value: false
An unique id for a radio button. (The specified value must be unique within the document.)
Name for a radio button. In order to form a set of choices from multiple radio buttons, all RadioButton widgets within this set must all have the same name. When sending a request to server, this property is the parameter's name.
If true, the control is read-only and cannot be edited. However, its content, if presents, is included in form submission.
Default value: false
Validity flag that shows whether a form element is validated to be valid (true) or invalid (false).
Default value: true
get className from superclass.
<Object>
constructor
|
Required |
|
Hide a specified element. The hidden element will not be displayed at all.
<Node>
elem
|
Optional |
Specified element to be hidden. |
Return true if the element is visible, otherwise false.
<Node>
elem
|
Optional |
Specified element to be checked. If not specified, domNode of the widget is used instead. |
Reset all state and value to default.
Display a specified element.
<Node>
elem
|
Optional |
Specified element to be displayed. |
Toggle visibility of a specified element.
<Node>
elem
|
Optional |
Specified element to toggle visibility. |
Fires when the value of an element has been changed.
<Object>
evt
|
javascript event object |
Fires when the user double-clicks on an element
<Object>
evt
|
javascript event object |
Fires when the user is pressing a key (on the keyboard).
<Object>
evt
|
javascript event object |
Fires when the user presses a key (on the keyboard).
<Object>
evt
|
javascript event object |
Fires when the user releases a key (on the keyboard).
<Object>
evt
|
javascript event object |
Fires when a user presses a mouse button over an element.
<Object>
evt
|
javascript event object |
Fires when the mouse pointer is moved out of an element.
<Object>
evt
|
javascript event object |
Fires when the mouse pointer is moved onto an element.
<Object>
evt
|
javascript event object |
Fires when a user releases a mouse button over an element.
<Object>
evt
|
javascript event object |