A GroupElement is a combination of one label and different controls associated to this label.
Constructor for a new smartform/GroupElement.
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.GroupElement(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 |
Name | Type | Default Value | Description |
---|---|---|---|
elementForLabel | int | 0 | Index of element to be used for label determination Visibility: public |
horizontalLayoutGroupElementMinWidth | int | Specifies the minimal size in pixels of all group elements of the form if horizontal Layout is used. Note: If |
|
useHorizontalLayout | boolean | Specifies whether the groups shall be rendered in a Note: If So don't set it to a different value from the one in the |
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. Warning: Do not put any layout or other container controls in here. This could damage the visual layout, keyboard support and screen-reader support. Only form controls are allowed. Views are also not supported. 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 customData 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.GroupElement.extend |
Creates a new subclass of class sap.ui.comp.smartform.GroupElement 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. Warning: Do not put any layout or other container controls in here. This could damage the visual layout, keyboard support and screen-reader support. Only form controls are allowed. Views are also not supported. Allowed controls implement the interface |
getFormElement |
Returns the from element. |
getHorizontalLayoutGroupElementMinWidth |
Gets current value of property horizontalLayoutGroupElementMinWidth. Specifies the minimal size in pixels of all group elements of the form if horizontal Layout is used. Note: If
Since 1.48.0 please do not use this property as it does not have any effect on the current layout of the <code>SmartForm</code> control.
|
getLabelText |
Returns the text of the label. |
sap.ui.comp.smartform.GroupElement.getMetadata |
Returns a metadata object for class sap.ui.comp.smartform.GroupElement. |
getUseHorizontalLayout |
Gets current value of property useHorizontalLayout. Specifies whether the groups shall be rendered in a Note: If So don't set it to a different value from the one in the
Since 1.86 replaced by {@link sap.ui.comp.smartform.ColumnLayout ColumnLayout} in the <code>layout</code> aggregation of the <code>SmartForm</code> control.
|
getVisibleBasedOnElements |
Determines the visibility of a |
indexOfElement |
Checks for the provided |
insertCustomData |
Inserts some customData 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. |
setEditMode |
Setter for property editable of all smart fields in children hierarchy.
Since 1.74.0 please do not change the edit mode on groupElement level, let the SmartForm inheritance do it
|
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 |
setHorizontalLayoutGroupElementMinWidth |
Sets a new value for property horizontalLayoutGroupElementMinWidth. Specifies the minimal size in pixels of all group elements of the form if horizontal Layout is used. Note: If When called with a value of
Since 1.48.0 please do not use this property as it does not have any effect on the current layout of the <code>SmartForm</code> control.
|
setUseHorizontalLayout |
Sets a new value for property useHorizontalLayout. Specifies whether the groups shall be rendered in a Note: If So don't set it to a different value from the one in the When called with a value of
Since 1.86 replaced by {@link sap.ui.comp.smartform.ColumnLayout ColumnLayout} in the <code>layout</code> aggregation of the <code>SmartForm</code> control.
|
Adds some customData 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.GroupElement
.
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.GroupElement
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.GroupElement
.
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.GroupElement 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.FormElement.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.
Warning: Do not put any layout or other container controls in here. This could damage the visual layout, keyboard support and screen-reader support. Only form controls are allowed. Views are also not supported. Allowed controls implement the interface sap.ui.core.IFormContent
.
Gets current value of property horizontalLayoutGroupElementMinWidth.
Specifies the minimal size in pixels of all group elements of the form if horizontal Layout is used.
Note: If Group
is assigned to a SmartForm
control, this property is inherited from the SmartForm
control. So don't set it manually.
Returns a metadata object for class sap.ui.comp.smartform.GroupElement.
Gets current value of property useHorizontalLayout.
Specifies whether the groups shall be rendered in a ResponsiveLayout
with label on top of the group element. Each group will be rendered in a new line.
Note: If Group
is assigned to a SmartForm
control, this property is inherited from the SmartForm
control.
So don't set it to a different value from the one in the SmartForm
control. For performance reasons it might make sense to set it manually to the same value as the one in the SmartForm
control when creating the GroupElement
element.
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 customData 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 insert; if empty, nothing is inserted |
|
iIndex | int |
the 0-based index the customData should be inserted at; for a negative value of iIndex, the customData is inserted at position 0; for a value greater than the current size of the aggregation, the customData 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 |
Setter for property editable of all smart fields in children hierarchy.
Param | Type | DefaultValue | Description |
---|---|---|---|
bEditMode | boolean |
new value for editable property of smart fields. |
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 |
Sets a new value for property horizontalLayoutGroupElementMinWidth.
Specifies the minimal size in pixels of all group elements of the form if horizontal Layout is used.
Note: If Group
is assigned to a SmartForm
control, this property is inherited from the SmartForm
control. So don't set it manually.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
iHorizontalLayoutGroupElementMinWidth | int |
New value for property |
Sets a new value for property useHorizontalLayout.
Specifies whether the groups shall be rendered in a ResponsiveLayout
with label on top of the group element. Each group will be rendered in a new line.
Note: If Group
is assigned to a SmartForm
control, this property is inherited from the SmartForm
control.
So don't set it to a different value from the one in the SmartForm
control. For performance reasons it might make sense to set it manually to the same value as the one in the SmartForm
control when creating the GroupElement
element.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
bUseHorizontalLayout | boolean |
New value for property |