class sap.ui.comp.smartform.Group

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

Groups are used to group group elements.


Constructor

Constructor for a new smartform/Group.

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.Group(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
horizontalLayoutGroupElementMinWidth int

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.

Visibility: public
label string

Label for the group.

Visibility: public
useHorizontalLayout boolean

Specifies whether the groups are 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 Group element.

Visibility: public

Aggregations

Default Aggregation: groupElements

Name Cardinality Type Description
groupElements (default) 0..n sap.ui.comp.IFormGroupElement

A GroupElement is a combination of one label and different controls associated to this label.

layout 0..1 sap.ui.layout.GridData

Layout to specify how the group shall be rendered (e.g. span and line-break)

Note: Do not use layout and layoutData aggregations combined.
Deprecated as of version 1.48.0. please use layoutData aggregation instead.


Methods Overview

Method Description
addCustomData

Adds some CustomData into the aggregation customData.

Note: customData that is used by the SmartField control itself is also added to the GroupElement elements and the SmartField controls in the children hierarchy. Additional customData that is not used by the SmartField control internally might not be added.

addGroupElement

Adds some groupElement to the aggregation groupElements.

destroyGroupElements

Destroys all the groupElements in the aggregation groupElements.

destroyLayout

Destroys the layout in the aggregation layout.

Since 1.48.0 please use <code>layoutData</code> aggregation instead.
destroyTitle

Destroys the title in the aggregation title.

sap.ui.comp.smartform.Group.extend

Creates a new subclass of class sap.ui.comp.smartform.Group 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.FormContainer.extend.

getGroupElements

Gets content of aggregation groupElements.

A GroupElement is a combination of one label and different controls associated to this label.

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 Group is assigned to a SmartForm control, this property is inherited from the SmartForm control. So don't set it manually.

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

Gets current value of property label.

Label for the group.

Since 1.88 replaced by <code>title</code> aggregation.
getLayout

Gets content of aggregation layout.

Layout to specify how the group shall be rendered (e.g. span and line-break)

Note: Do not use layout and layoutData aggregations combined.

Since 1.48.0 please use <code>layoutData</code> aggregation instead.
sap.ui.comp.smartform.Group.getMetadata

Returns a metadata object for class sap.ui.comp.smartform.Group.

getTitle

Gets content of aggregation title.

Can either be a Title element or a string.

getUseHorizontalLayout

Gets current value of property useHorizontalLayout.

Specifies whether the groups are 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 Group element.

Since 1.86 replaced by {@link sap.ui.comp.smartform.ColumnLayout ColumnLayout} in the <code>layout</code> aggregation of the <code>SmartForm</code> control.
indexOfGroupElement

Checks for the provided sap.ui.comp.IFormGroupElement in the aggregation groupElements. and returns its index if found or -1 otherwise.

insertCustomData

Inserts some customData into the aggregation customData.

Note: customData that is used by the SmartField control itself is also added to the GroupElement elements and the SmartField controls in the children hierarchy. Additional customData that is not used by the SmartField control internally might not be added.

insertGroupElement

Inserts a groupElement into the aggregation groupElements.

removeAllGroupElements

Removes all the controls from the aggregation groupElements.

Additionally, it unregisters them from the hosting UIArea.

removeGroupElement

Removes a groupElement from the aggregation groupElements.

setEditMode

Setter for property editable of all smart fields in children hierarchy.

Since 1.74.0 please do not change the edit mode on group level, let the SmartForm inheritance do it
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 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.

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

Sets a new value for property label.

Label for the group.

When called with a value of null or undefined, the default value of the property will be restored.

Since 1.88 replaced by <code>title</code> aggregation.
setLayout

Sets the aggregated layout.

Since 1.48.0 please use <code>layoutData</code> aggregation instead.
setTitle

Sets the aggregated title.

Can either be a Title element or a string. If a Title element is used, the style of the title can be set.

Note: If the title is provided as a string, the title is rendered with a theme-dependent default level. As the SmartForm control cannot know the structure of the page, this might not fit the page structure. In this case provide the title using a Title element and set its level to the required value.

setUseHorizontalLayout

Sets a new value for property useHorizontalLayout.

Specifies whether the groups are 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 Group element.

When called with a value of null or undefined, the default value of the property will be restored.

Since 1.86 replaced by {@link sap.ui.comp.smartform.ColumnLayout ColumnLayout} in the <code>layout</code> aggregation of the <code>SmartForm</code> control.
setVisible

Sets a new value for property visible. If set to false, the Group is not rendered. Default value is true.

addCustomData

Adds some CustomData into the aggregation customData.

Note: customData that is used by the SmartField control itself is also added to the GroupElement elements and 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

addGroupElement

Adds some groupElement to the aggregation groupElements.

Param Type DefaultValue Description
oGroupElement sap.ui.comp.IFormGroupElement

The groupElement to add; if empty, nothing is inserted

destroyGroupElements

Destroys all the groupElements in the aggregation groupElements.

destroyLayout

Destroys the layout in the aggregation layout.

Since 1.48.0 please use <code>layoutData</code> aggregation instead.

destroyTitle

Destroys the title in the aggregation title.

sap.ui.comp.smartform.Group.extend

Creates a new subclass of class sap.ui.comp.smartform.Group 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.FormContainer.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

getGroupElements

Gets content of aggregation groupElements.

A GroupElement is a combination of one label and different controls associated to this label.

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 Group is assigned to a SmartForm control, this property is inherited from the SmartForm control. So don't set it manually.

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.

getLabel

Gets current value of property label.

Label for the group.

Since 1.88 replaced by <code>title</code> aggregation.

getLayout

Gets content of aggregation layout.

Layout to specify how the group shall be rendered (e.g. span and line-break)

Note: Do not use layout and layoutData aggregations combined.

Since 1.48.0 please use <code>layoutData</code> aggregation instead.

sap.ui.comp.smartform.Group.getMetadata

Returns a metadata object for class sap.ui.comp.smartform.Group.

getTitle

Gets content of aggregation title.

Can either be a Title element or a string.

getUseHorizontalLayout

Gets current value of property useHorizontalLayout.

Specifies whether the groups are 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 Group element.

Since 1.86 replaced by {@link sap.ui.comp.smartform.ColumnLayout ColumnLayout} in the <code>layout</code> aggregation of the <code>SmartForm</code> control.

indexOfGroupElement

Checks for the provided sap.ui.comp.IFormGroupElement in the aggregation groupElements. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oGroupElement sap.ui.comp.IFormGroupElement

The groupElement whose index is looked for

insertCustomData

Inserts some customData into the aggregation customData.

Note: customData that is used by the SmartField control itself is also added to the GroupElement elements and 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

insertGroupElement

Inserts a groupElement into the aggregation groupElements.

Param Type DefaultValue Description
oGroupElement sap.ui.comp.IFormGroupElement

The groupElement to insert; if empty, nothing is inserted

iIndex int

The 0-based index the groupElement should be inserted at; for a negative value of iIndex, the groupElement is inserted at position 0; for a value greater than the current size of the aggregation, the groupElement is inserted at the last position

removeAllGroupElements

Removes all the controls from the aggregation groupElements.

Additionally, it unregisters them from the hosting UIArea.

removeGroupElement

Removes a groupElement from the aggregation groupElements.

Param Type DefaultValue Description
vGroupElement int string sap.ui.comp.IFormGroupElement

The groupElement to remove or its index or id

setEditMode

Setter for property editable of all smart fields in children hierarchy.

Since 1.74.0 please do not change the edit mode on group level, let the SmartForm inheritance do it
Param Type DefaultValue Description
bEditMode boolean

new value for editable property of smart fields.

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

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.
Param Type DefaultValue Description
iHorizontalLayoutGroupElementMinWidth int

New value for property horizontalLayoutGroupElementMinWidth

setLabel

Sets a new value for property label.

Label for the group.

When called with a value of null or undefined, the default value of the property will be restored.

Since 1.88 replaced by <code>title</code> aggregation.
Param Type DefaultValue Description
sLabel string

New value for property label

setLayout

Sets the aggregated layout.

Since 1.48.0 please use <code>layoutData</code> aggregation instead.
Param Type DefaultValue Description
oLayout sap.ui.layout.GridData

The layout to set

setTitle

Sets the aggregated title.

Can either be a Title element or a string. If a Title element is used, the style of the title can be set.

Note: If the title is provided as a string, the title is rendered with a theme-dependent default level. As the SmartForm control cannot know the structure of the page, this might not fit the page structure. In this case provide the title using a Title element and set its level to the required value.

Param Type DefaultValue Description
vTitle sap.ui.core.Title string

The title to set

setUseHorizontalLayout

Sets a new value for property useHorizontalLayout.

Specifies whether the groups are 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 Group element.

When called with a value of null or undefined, the default value of the property will be restored.

Since 1.86 replaced by {@link sap.ui.comp.smartform.ColumnLayout ColumnLayout} in the <code>layout</code> aggregation of the <code>SmartForm</code> control.
Param Type DefaultValue Description
bUseHorizontalLayout boolean

New value for property useHorizontalLayout

setVisible

Sets a new value for property visible. If set to false, the Group is not rendered. Default value is true.

Param Type DefaultValue Description
bVisible boolean

New value for property visible