SemanticGroupElement holds the semantically connected fields divided by a delimiter. Note: Semantically connected fields don't support async control functionality such as text arrangement, currency or unit of measure.
Constructor for a new smartform/SemanticGroupElement.
Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers. See sap.ui.base.ManagedObject#constructor for a general description of the syntax of the settings object.
new sap.ui.comp.smartform.SemanticGroupElement(sId?, mSettings?)
Param | Type | Default Value | Description |
---|---|---|---|
sId? | string | ID for the new control, generated automatically if no ID is given |
|
mSettings? | object | Initial settings for the new control |
Default Aggregation: elements
Name | Cardinality | Type | Description |
---|---|---|---|
elements (default) | 0..n | sap.ui.core.Control |
Aggregation of controls to be displayed together with a label and separated by delimiter. Warning: Do not put any layout or other container controls in here. This could damage the visual layout, keyboard support and screen-reader support. Views are also not supported. Only form controls are allowed. Allowed controls implement the interface |
Event | Description |
---|---|
visibleChanged |
The event is fired after the visibility of the control has changed. |
Method | Description |
---|---|
addCustomData |
Adds some custom data into the aggregation Note: |
addElement |
Adds some element to the aggregation elements. |
attachVisibleChanged |
Attaches event handler When called, the context of the event handler (its The event is fired after the visibility of the control has changed. |
destroyElements |
Destroys all the elements in the aggregation elements. |
detachVisibleChanged |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.ui.comp.smartform.SemanticGroupElement.extend |
Creates a new subclass of class sap.ui.comp.smartform.SemanticGroupElement with name
|
fireVisibleChanged |
Fires event visibleChanged to attached listeners. |
getDataSourceLabel |
Try to return label from data source from SmartField from which label is generated |
getElementForLabel |
Gets current value of property elementForLabel. Index of element to be used for label determination Default value is |
getElements |
Gets content of aggregation elements. Aggregation of controls to be displayed together with a label and separated by delimiter. Warning: Do not put any layout or other container controls in here. This could damage the visual layout, keyboard support and screen-reader support. Views are also not supported. Only form controls are allowed. Allowed controls implement the interface |
getFormElement |
Returns the semantic form element. |
getLabelText |
Returns the text of the label. |
sap.ui.comp.smartform.SemanticGroupElement.getMetadata |
Returns a metadata object for class sap.ui.comp.smartform.SemanticGroupElement. |
getVisibleBasedOnElements |
Determines the visibility of a |
indexOfElement |
Checks for the provided |
insertCustomData |
Inserts some custom data into the aggregation Note: |
insertElement |
Inserts a element into the aggregation elements. |
removeAllElements |
Removes all the controls from the aggregation elements. Additionally, it unregisters them from the hosting UIArea. |
removeElement |
Removes a element from the aggregation elements. |
setElementForLabel |
Sets a new value for property elementForLabel. Index of element to be used for label determination When called with a value of Default value is |
Adds some custom data into the aggregation customData
.
Note: customData
that is used by the SmartField
control itself is also added to the SmartField
controls in the children hierarchy. Additional customData
that is not used by the SmartField
control internally might not be added.
Param | Type | DefaultValue | Description |
---|---|---|---|
oCustomData | sap.ui.core.CustomData |
the customData to add; if empty, nothing is added |
Adds some element to the aggregation elements.
Param | Type | DefaultValue | Description |
---|---|---|---|
oElement | sap.ui.core.Control |
The element to add; if empty, nothing is inserted |
Attaches event handler fnFunction
to the visibleChanged event of this sap.ui.comp.smartform.SemanticGroupElement
.
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.comp.smartform.SemanticGroupElement
itself.
The event is fired after the visibility of the control has changed.
Param | Type | DefaultValue | Description |
---|---|---|---|
oData | object |
An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called when the event occurs |
|
oListener | object |
Context object to call the event handler with. Defaults to this |
Detaches event handler fnFunction
from the visibleChanged event of this sap.ui.comp.smartform.SemanticGroupElement
.
The passed function and listener object must match the ones used for event registration.
Param | Type | DefaultValue | Description |
---|---|---|---|
fnFunction | function(sap.ui.base.Event) : void |
The function to be called, when the event occurs |
|
oListener | object |
Context object on which the given function had to be called |
Creates a new subclass of class sap.ui.comp.smartform.SemanticGroupElement 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.layout.form.SemanticFormElement.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |
Fires event visibleChanged to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
Try to return label from data source from SmartField from which label is generated
Gets current value of property elementForLabel.
Index of element to be used for label determination
Default value is 0
.
Gets content of aggregation elements.
Aggregation of controls to be displayed together with a label and separated by delimiter.
Warning: Do not put any layout or other container controls in here. This could damage the visual layout, keyboard support and screen-reader support. Views are also not supported. Only form controls are allowed. Allowed controls implement the interface sap.ui.core.IFormContent
.
Returns a metadata object for class sap.ui.comp.smartform.SemanticGroupElement.
Determines the visibility of a SemanticGroupElement
based on the inner elements
Checks for the provided sap.ui.core.Control
in the aggregation elements. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oElement | sap.ui.core.Control |
The element whose index is looked for |
Inserts some custom data into the aggregation customData
.
Note: customData
that is used by the SmartField
control itself is also added to the SmartField
controls in the children hierarchy. Additional customData
that is not used by the SmartField
control internally might not be added.
Param | Type | DefaultValue | Description |
---|---|---|---|
oCustomData | sap.ui.core.CustomData |
the custom data to insert; if empty, nothing is inserted |
|
iIndex | int |
the 0-based index the custom data should be inserted at; for a negative value of iIndex, the custom data is inserted at position 0; for a value greater than the current size of the aggregation, the custom data is inserted at the last position |
Inserts a element into the aggregation elements.
Param | Type | DefaultValue | Description |
---|---|---|---|
oElement | sap.ui.core.Control |
The element to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Removes all the controls from the aggregation elements.
Additionally, it unregisters them from the hosting UIArea.
Removes a element from the aggregation elements.
Param | Type | DefaultValue | Description |
---|---|---|---|
vElement | int string sap.ui.core.Control |
The element to remove or its index or id |
Sets a new value for property elementForLabel.
Index of element to be used for label determination
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 0
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iElementForLabel | int | 0 |
New value for property |