sap.m.RadioButton.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.RadioButton with name
sClassName
and enriches it with the information contained in
oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.core.Control.extend.
Parameters:
{string} | sClassName | Name of the class being created |
{object} | oClassInfo? | Object literal with information about the class |
{function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
Returns:
{function} | Created class / constructor function |
Returns a metadata object for class sap.m.RadioButton.
Returns:
Adds some ariaDescribedBy into the association ariaDescribedBy
.
Parameters:
{string|sap.ui.core.Control} | vAriaDescribedBy | the ariaDescribedBy to add; if empty, nothing is inserted |
Returns:
Adds some ariaLabelledBy into the association ariaLabelledBy
.
Parameters:
{string|sap.ui.core.Control} | vAriaLabelledBy | the ariaLabelledBy to add; if empty, nothing is inserted |
Returns:
Attaches event handler
fnFunction
to the
select
event of this
sap.m.RadioButton
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.m.RadioButton
itself.
Event is triggered when the user makes a change on the radio button (selecting or unselecting it).
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.m.RadioButton itself |
Returns:
Detaches event handler
fnFunction
from the
select
event of this
sap.m.RadioButton
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
exit()
Destroys all related objects to the RadioButton
Fires event
select
to attached listeners.
Expects the following event parameters:
selected
of type boolean
Checks whether the RadioButton is active or not.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
getActiveHandling(): boolean
Gets current value of property
activeHandling
.
This is a flag to switch on activeHandling. When it is switched off, there will not be visual changes on active state. Default value is 'true'
Default value is true
.
Returns:
{boolean} | Value of property activeHandling |
Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy
.
Returns:
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy
.
Returns:
getEditable(): boolean
Gets current value of property
editable
.
Specifies whether the user can select the radio button.
Default value is true
.
- Since:
- 1.25
Returns:
{boolean} | Value of property editable |
getEnabled(): boolean
Gets current value of property
enabled
.
Specifies if the radio button is disabled.
Default value is true
.
Returns:
{boolean} | Value of property enabled |
getGroupName(): string
Gets current value of property
groupName
.
Name of the radio button group the current radio button belongs to. You can define a new name for the group. If no new name is specified, this radio button belongs to the sapMRbDefaultGroup per default. Default behavior of a radio button in a group is that when one of the radio buttons in a group is selected, all others are unselected.
Default value is sapMRbDefaultGroup
.
Returns:
{string} | Value of property groupName |
getSelected(): boolean
Gets current value of property
selected
.
Specifies the select state of the radio button
Default value is false
.
Returns:
{boolean} | Value of property selected |
getText(): string
Gets current value of property
text
.
Specifies the text displayed next to the RadioButton
Returns:
{string} | Value of property text |
Gets current value of property
textAlign
.
Specifies the alignment of the radio button. Available alignment settings are "Begin", "Center", "End", "Left", and "Right".
Default value is Begin
.
- Since:
- 1.28
Returns:
Gets current value of property
textDirection
.
Options for the text direction are RTL and LTR. Alternatively, the control can inherit the text direction from its parent container.
Default value is Inherit
.
Returns:
Gets current value of property
valueState
.
Enumeration sap.ui.core.ValueState provides state values Error, Success, Warning, None
Default value is None
.
- Since:
- 1.25
Returns:
Gets current value of property
width
.
Width of the Label
Default value is
.
Returns:
onsapselect(oEvent)
Pseudo event for pseudo 'select' event... space, enter, ... without modifiers (Ctrl, Alt or Shift)
Parameters:
{object} | oEvent | provides information for the event |
Removes all the controls in the association named ariaDescribedBy
.
Returns:
Removes all the controls in the association named ariaLabelledBy
.
Returns:
Removes an ariaDescribedBy from the association named ariaDescribedBy
.
Parameters:
{int|string|sap.ui.core.Control} | vAriaDescribedBy | The ariaDescribedByto be removed or its index or ID |
Returns:
Removes an ariaLabelledBy from the association named ariaLabelledBy
.
Parameters:
{int|string|sap.ui.core.Control} | vAriaLabelledBy | The ariaLabelledByto be removed or its index or ID |
Returns:
Sets a new value for property
activeHandling
.
This is a flag to switch on activeHandling. When it is switched off, there will not be visual changes on active state. Default value is 'true'
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bActiveHandling | New value for property activeHandling |
Returns:
setActiveState(bActive): void
Method to set a RadioButton's state to active or inactive.
Parameters:
{boolean} | bActive | Sets the active state to true or false |
Sets a new value for property
editable
.
Specifies whether the user can select the radio button.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bEditable | New value for property editable |
- Since:
- 1.25
Returns:
Sets a new value for property
enabled
.
Specifies if the radio button is disabled.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bEnabled | New value for property enabled |
Returns:
Sets RadioButton's groupName. Only one radioButton from the same group can be selected
Parameters:
{string} | sGroupName | Name of the group to which the RadioButton will belong. |
Returns:
Sets the state of the RadioButton to selected.
Parameters:
{boolean} | bSelected | defines if the radio button is selected |
Returns:
Sets the text for the RadioButton's label.
Parameters:
{string} | sText | The text to be set |
Returns:
Sets a new value for property
textAlign
.
Specifies the alignment of the radio button. Available alignment settings are "Begin", "Center", "End", "Left", and "Right".
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Begin
.
Parameters:
- Since:
- 1.28
Returns:
Sets the text direction for the RadioButton's label.
Parameters:
{string} | sDirection | Text direction to be set to RadioButton's label |
Returns:
Sets a new value for property
valueState
.
Enumeration sap.ui.core.ValueState provides state values Error, Success, Warning, None
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is None
.
Parameters:
- Since:
- 1.25
Returns:
Sets the width for the RadioButton's label.
Parameters:
{string} | sWidth | CSS size to be set as width of the label |
Returns: