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 |
Returns a metadata object for class sap.ui.comp.smartform.GroupElement.
Returns:
Adds some customData into the aggregation customData
. Additionally, customData is also added to the SmartField controls in the children hierarchy.
Parameters:
Returns:
addElement(oElement)
Adds some control into the aggregation elements
Parameters:
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:
Destroys all the elements in the aggregation elements
.
Returns:
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:
Fires event visibleChanged
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
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:
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:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
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:
Removes all the controls in the aggregation named elements.
Returns:
Removes an element from the aggregation named elements.
Parameters:
Returns:
Setter for property editable of all smart fields in children hierarchy.
Parameters:
{boolean} | bEditMode | new value for editable property of smart fields. |
Returns:
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:
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:
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 |
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: