sap.ui.commons.RadioButtonGroup.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.commons.RadioButtonGroup 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.ui.commons.RadioButtonGroup.
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:
Adds some item to the aggregation items
.
Parameters:
Returns:
Attaches event handler
fnFunction
to the
select
event of this
sap.ui.commons.RadioButtonGroup
.
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.ui.commons.RadioButtonGroup
itself.
Fires when selection is changed by user interaction.
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.ui.commons.RadioButtonGroup itself |
Returns:
Parameters:
{object} | oBindingInfo | The binding information |
Returns:
Creates a new instance of RadioButtonGroup, with the same settings as the RadioButtonGroup on which the method is called. Event handlers are not cloned.
Returns:
Destroys all the items in the aggregation items
.
Returns:
Detaches event handler
fnFunction
from the
select
event of this
sap.ui.commons.RadioButtonGroup
.
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:
Fires event
select
to attached listeners.
Expects the following event parameters:
selectedIndex
of type int
Index of the selected RadioButton.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
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:
getColumns(): int
Gets current value of property
columns
.
Determines the maximum number of RadioButtons displayed in one line.
Default value is 1
.
Returns:
{int} | Value of property columns |
getEditable(): boolean
Gets current value of property
editable
.
Specifies whether the user can change the selected value of the RadioButtonGroup. When the property is set to false, the control obtains visual styles different from its visual styles for the normal and the disabled state. Additionally the control is no longer interactive, but can receive focus.
Default value is true
.
Returns:
{boolean} | Value of property editable |
getEnabled(): boolean
Gets current value of property
enabled
.
Enables/disables the RadioButtonGroup. If it is disabled all RadioButtons will be displayed as disabled. The enabled property of the Item will not be used in this case. If the RadioButtonGroup is enabled, the enabled property of the Item will define if a RadioButton is enabled or not.
Default value is true
.
- Since:
- 1.10.3
Returns:
{boolean} | Value of property enabled |
Gets content of aggregation
items
.
The RadioButtons of this RadioButtonGroup.
Returns:
getSelectedIndex(): int
Gets current value of property
selectedIndex
.
The index of the selected/checked RadioButton.
Default value is 0
.
Returns:
{int} | Value of property selectedIndex |
When no item is selected, "null" is returned.
Returns:
Gets current value of property
valueState
.
Тhe value state to be displayed for the RadioButton. Possible values are: sap.ui.core.ValueState.Error, sap.ui.core.ValueState.Warning, sap.ui.core.ValueState.Success and sap.ui.core.ValueState.None. Note: Setting this attribute to sap.ui.core.ValueState.Error when the accessibility feature is enabled, sets the value of the invalid property for the whole RadioButtonGroup to true.
Default value is None
.
Returns:
Gets current value of property
width
.
Defines the width of the RadioButtonGroup.
Returns:
indexOfItem(oItem): int
Checks for the provided sap.ui.core.Item
in the aggregation items
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
Inserts a item into the aggregation items
.
Parameters:
{sap.ui.core.Item} | oItem | the item to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the item should be inserted at; for a negative value of iIndex , the item is inserted at position 0; for a value greater than the current size of the aggregation, the item is inserted at the last position |
Returns:
Removes all the controls in the association named ariaDescribedBy
.
Returns:
Removes all the controls in the association named ariaLabelledBy
.
Returns:
Removes all the controls from the aggregation
items
.
Additionally, it unregisters them from the hosting UIArea.
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:
Removes a item from the aggregation items
.
Parameters:
Returns:
Sets a new value for property
columns
.
Determines the maximum number of RadioButtons displayed in one line.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 1
.
Parameters:
{int} | iColumns | New value for property columns |
Returns:
Sets a new value for property
editable
.
Specifies whether the user can change the selected value of the RadioButtonGroup. When the property is set to false, the control obtains visual styles different from its visual styles for the normal and the disabled state. Additionally the control is no longer interactive, but can receive focus.
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 |
Returns:
Sets a new value for property
enabled
.
Enables/disables the RadioButtonGroup. If it is disabled all RadioButtons will be displayed as disabled. The enabled property of the Item will not be used in this case. If the RadioButtonGroup is enabled, the enabled property of the Item will define if a RadioButton is enabled or not.
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 |
- Since:
- 1.10.3
Returns:
Sets a new value for property
selectedIndex
.
The index of the selected/checked RadioButton.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
Parameters:
{int} | iSelectedIndex | New value for property selectedIndex |
Returns:
setSelectedItem(oSelectedItem)
Sets the Item as selected and removes the selection from the previous one.
Parameters:
Sets a new value for property
valueState
.
Тhe value state to be displayed for the RadioButton. Possible values are: sap.ui.core.ValueState.Error, sap.ui.core.ValueState.Warning, sap.ui.core.ValueState.Success and sap.ui.core.ValueState.None. Note: Setting this attribute to sap.ui.core.ValueState.Error when the accessibility feature is enabled, sets the value of the invalid property for the whole RadioButtonGroup to true.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is None
.
Parameters:
Returns:
Sets a new value for property
width
.
Defines the width of the RadioButtonGroup.
When called with a value of null
or undefined
, the default value of the property will be restored.
Parameters:
Returns:
Unbinds aggregation items
from model data.
Returns: