Class sap.ui.comp.smartform.GroupElementModule: sap/ui/comp/smartform/GroupElement

extends Control

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

Constructor Summary
new sap.ui.comp.smartform.GroupElement(sId?, mSettings?)Constructor for a new smartform/GroupElement.
Event Summary
visibleChanged(oControlEvent)The event is fired after the visibility of the control has changed.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.comp.smartform.GroupElement.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.comp.smartform.GroupElement with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.comp.smartform.GroupElement.getMetadata()Returns a metadata object for class sap.ui.comp.smartform.GroupElement.
addCustomData(oCustomData)Adds some customData into the aggregation customData.
addElement(oElement)Adds some control into the aggregation elements
attachVisibleChanged(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the visibleChanged event of this sap.ui.comp.smartform.GroupElement.
destroyElements()Destroys all the elements in the aggregation elements.
detachVisibleChanged(fnFunction, oListener)Detaches event handler fnFunction from the visibleChanged event of this sap.ui.comp.smartform.GroupElement.
fireVisibleChanged(mArguments?)Fires event visibleChanged to attached listeners.
getElementForLabel()Gets current value of property elementForLabel.
getElements()Getter for aggregation elements
getFormElement()Returns the from element.
getHorizontalLayoutGroupElementMinWidth()Gets current value of property horizontalLayoutGroupElementMinWidth.
getLabelText()Returns the text of the label.
getUseHorizontalLayout()Gets current value of property useHorizontalLayout.
getVisibleBasedOnElements()Determines the visibility of a group element based on elements
indexOfElement(oElement)Checks for the provided sap.ui.core.Control in the aggregation elements.
insertElement(oElement, iIndex)Inserts a control into the aggregation elements
removeAllElements()Removes all the controls in the aggregation named elements.
removeElement(The)Removes an element from the aggregation named elements.
setEditMode(bEditMode)Setter for property editable of all smart fields in children hierarchy.
setElementForLabel(iElementForLabel)Sets a new value for property elementForLabel.
setHorizontalLayoutGroupElementMinWidth(iHorizontalLayoutGroupElementMinWidth)Sets a new value for property horizontalLayoutGroupElementMinWidth.
setProperty(sPropertyName, oValue)Sets the given value for the given property
setUseHorizontalLayout(bUseHorizontalLayout)Sets a new value for property useHorizontalLayout.
Constructor Detail
new sap.ui.comp.smartform.GroupElement(sId?, mSettings?)
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 for a general description of the syntax of the settings object.

The supported settings are:

In addition, all settings applicable to the base type sap.ui.core.Control can be used as well.

Parameters:
{string}sId? ID for the new control, generated automatically if no ID is given
{object}mSettings? initial settings for the new control
Event Detail
visibleChanged(oControlEvent)
The event is fired after the visibility of the control has changed.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Method Detail
sap.ui.comp.smartform.GroupElement.extend(sClassName, oClassInfo?, FNMetaImpl?): function
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.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
sap.ui.comp.smartform.GroupElement.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.comp.smartform.GroupElement.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addCustomData(oCustomData): sap.ui.comp.smartform.GroupElement
Adds some customData into the aggregation customData. Additionally, customData is also added to the SmartField controls in the children hierarchy.
Parameters:
{sap.ui.core.CustomData}oCustomData the customData to add.
Returns:
{sap.ui.comp.smartform.GroupElement}this to allow method chaining.
addElement(oElement)
Adds some control into the aggregation elements
Parameters:
{sap.ui.core.Control}oElement the control to add.
attachVisibleChanged(oData?, fnFunction, oListener?): sap.ui.comp.smartform.GroupElement
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.

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.comp.smartform.GroupElement itself
Returns:
{sap.ui.comp.smartform.GroupElement} Reference to this in order to allow method chaining
Destroys all the elements in the aggregation elements.
Returns:
{sap.ui.comp.smartform.GroupElement} Reference to this in order to allow method chaining
detachVisibleChanged(fnFunction, oListener): sap.ui.comp.smartform.GroupElement
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.

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:
{sap.ui.comp.smartform.GroupElement} Reference to this in order to allow method chaining
fireVisibleChanged(mArguments?): sap.ui.comp.smartform.GroupElement
Fires event visibleChanged to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.ui.comp.smartform.GroupElement} Reference to this in order to allow method chaining
getElementForLabel(): int
Gets current value of property elementForLabel.

Index of element to be used for label determination

Default value is 0.

Returns:
{int} Value of property elementForLabel
getElements(): sap.ui.core.Controls[]
Getter for aggregation elements
Returns:
{sap.ui.core.Controls[]} an array of the removed controls.
Returns the from element.
Returns:
{sap.ui.layout.form.FormElement} the form element.
getHorizontalLayoutGroupElementMinWidth(): int
Gets current value of property horizontalLayoutGroupElementMinWidth.

Specifies the minimal size in pixels of all group elements of the form if horizontal Layout is used.

Returns:
{int} Value of property horizontalLayoutGroupElementMinWidth
getLabelText(): string
Returns the text of the label.
Returns:
{string} text of the label.
getUseHorizontalLayout(): boolean
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.

Returns:
{boolean} Value of property useHorizontalLayout
getVisibleBasedOnElements(): boolean
Determines the visibility of a group element based on elements
Returns:
{boolean} Returns true, in case one element of the group element is visible
indexOfElement(oElement): int
Checks for the provided sap.ui.core.Control in the aggregation elements. and returns its index if found or -1 otherwise.
Parameters:
{sap.ui.core.Control}oElement The element whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertElement(oElement, iIndex): sap.ui.comp.smartform.GroupElement
Inserts a control into the aggregation elements
Parameters:
{sap.ui.core.Control}oElement the control to insert into aggregation named elements.
{int}iIndex the 0-based index the control should be inserted at.
Returns:
{sap.ui.comp.smartform.GroupElement}this to allow method chaining.
removeAllElements(): sap.ui.core.Control[]
Removes all the controls in the aggregation named elements.
Returns:
{sap.ui.core.Control[]} An array of the removed elements (might be empty)
removeElement(The): sap.ui.core.Control
Removes an element from the aggregation named elements.
Parameters:
{int|string|sap.ui.core.Control}The element to remove or its index or ID
Returns:
{sap.ui.core.Control} The removed element or null
setEditMode(bEditMode): sap.ui.comp.smartform.GroupElement
Setter for property editable of all smart fields in children hierarchy.
Parameters:
{boolean}bEditMode new value for editable property of smart fields.
Returns:
{sap.ui.comp.smartform.GroupElement}this to allow method chaining.
setElementForLabel(iElementForLabel): sap.ui.comp.smartform.GroupElement
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.

Parameters:
{int}iElementForLabel New value for property elementForLabel
Returns:
{sap.ui.comp.smartform.GroupElement} Reference to this in order to allow method chaining
setHorizontalLayoutGroupElementMinWidth(iHorizontalLayoutGroupElementMinWidth): sap.ui.comp.smartform.GroupElement
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.

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

Parameters:
{int}iHorizontalLayoutGroupElementMinWidth New value for property horizontalLayoutGroupElementMinWidth
Returns:
{sap.ui.comp.smartform.GroupElement} Reference to this in order to allow method chaining
setProperty(sPropertyName, oValue)
Sets the given value for the given property
Parameters:
{string}sPropertyName name of the property to set
{any}oValue value to set the property to
setUseHorizontalLayout(bUseHorizontalLayout): sap.ui.comp.smartform.GroupElement
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.

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

Parameters:
{boolean}bUseHorizontalLayout New value for property useHorizontalLayout
Returns:
{sap.ui.comp.smartform.GroupElement} Reference to this in order to allow method chaining