class sap.ui.comp.smartform.SemanticGroupElement

Visiblity: public
UX Guidelines:
Implements: sap.ui.comp.IFormGroupElement
Available since: N/A
Module: sap/ui/comp/smartform/SemanticGroupElement
Application Component: CA-UI5-CMP

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

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


Properties

Name Type Default Value Description
elementForLabel int 0

Index of element to be used for label determination

Visibility: public

Aggregations

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 sap.ui.core.IFormContent.


Events Overview

Event Description
visibleChanged

The event is fired after the visibility of the control has changed.

visibleChanged

The event is fired after the visibility of the control has changed.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

Methods Overview

Method Description
addCustomData

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.

addElement

Adds some element to the aggregation elements.

attachVisibleChanged

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.

destroyElements

Destroys all the elements in the aggregation elements.

detachVisibleChanged

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.

sap.ui.comp.smartform.SemanticGroupElement.extend

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.

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 0.

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 sap.ui.core.IFormContent.

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 SemanticGroupElement based on the inner elements

indexOfElement

Checks for the provided sap.ui.core.Control in the aggregation elements. and returns its index if found or -1 otherwise.

insertCustomData

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.

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 null or undefined, the default value of the property will be restored.

Default value is 0.

addCustomData

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

addElement

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

attachVisibleChanged

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 sap.ui.comp.smartform.SemanticGroupElement itself

destroyElements

Destroys all the elements in the aggregation elements.

detachVisibleChanged

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

sap.ui.comp.smartform.SemanticGroupElement.extend

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

fireVisibleChanged

Fires event visibleChanged to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

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 0.

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 sap.ui.core.IFormContent.

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 SemanticGroupElement based on the inner elements

indexOfElement

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

insertCustomData

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

insertElement

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 0-based index the element should be inserted at; for a negative value of iIndex, the element is inserted at position 0; for a value greater than the current size of the aggregation, the element is inserted at the last position

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.

Param Type DefaultValue Description
vElement int string sap.ui.core.Control

The element to remove or its index or id

setElementForLabel

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 elementForLabel