A FormContainer
represents a group inside a Form
. It consists of FormElements
. The rendering of the FormContainer
is done by the FormLayout
assigned to the Form
.
Since: 1.16.0.
Method Summary
sap.ui.layout.form.FormContainer.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.layout.form.FormContainer with name sClassName
and enriches it with the information contained in oClassInfo
. addAriaLabelledBy(vAriaLabelledBy)Adds some ariaLabelledBy into the association ariaLabelledBy
. addFormElement(oFormElement)Adds some formElement to the aggregation formElements
. getAriaLabelledBy()Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy
. getTitle()Gets content of aggregation title
. getVisible()Gets current value of property visible
. indexOfFormElement(oFormElement)Checks for the provided sap.ui.layout.form.FormElement
in the aggregation formElements
. insertFormElement(oFormElement, iIndex)Inserts a formElement into the aggregation formElements
. removeAriaLabelledBy(vAriaLabelledBy)Removes an ariaLabelledBy from the association named ariaLabelledBy
. removeFormElement(vFormElement)Removes a formElement from the aggregation formElements
. setExpandable(bExpandable)Sets a new value for property expandable
. setExpanded(bExpanded)Sets a new value for property expanded
. setTitle(vTitle)Sets the aggregated title
. setVisible(bVisible)Sets a new value for property visible
. $,
addCustomData,
addDependent,
addEventDelegate,
applyFocusInfo,
bindElement,
clone,
data,
destroy,
destroyCustomData,
destroyDependents,
destroyLayoutData,
destroyTooltip,
enhanceAccessibilityState,
exit,
findElements,
fireEvent,
focus,
getCustomData,
getDependents,
getDomRef,
getElementBinding,
getFocusDomRef,
getFocusInfo,
getInterface,
getLayoutData,
getMetadata,
getTooltip,
getTooltip_AsString,
getTooltip_Text,
indexOfCustomData,
indexOfDependent,
init,
insertCustomData,
insertDependent,
prop,
removeAllCustomData,
removeAllDependents,
removeCustomData,
removeDependent,
removeEventDelegate,
rerender,
setLayoutData,
setTooltip,
toString,
unbindElement addAggregation,
addAssociation,
applySettings,
attachFormatError,
attachModelContextChange,
attachParseError,
attachValidationError,
attachValidationSuccess,
bindAggregation,
bindContext,
bindObject,
bindProperty,
destroyAggregation,
detachFormatError,
detachModelContextChange,
detachParseError,
detachValidationError,
detachValidationSuccess,
findAggregatedObjects,
fireFormatError,
fireModelContextChange,
fireParseError,
fireValidationError,
fireValidationSuccess,
getAggregation,
getAssociation,
getBinding,
getBindingContext,
getBindingInfo,
getBindingPath,
getEventingParent,
getId,
getModel,
getObjectBinding,
getOriginInfo,
getParent,
getProperty,
hasModel,
indexOfAggregation,
insertAggregation,
invalidate,
isBound,
isInvalidateSuppressed,
isTreeBinding,
propagateMessages,
removeAggregation,
removeAllAggregation,
removeAllAssociation,
removeAssociation,
setAggregation,
setAssociation,
setBindingContext,
setModel,
setProperty,
unbindAggregation,
unbindContext,
unbindObject,
unbindProperty,
validateAggregation,
validateProperty Constructor Detail
new sap.ui.layout.form.FormContainer(sId?, mSettings?)
Constructor for a new sap.ui.layout.form.FormContainer.
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.Element 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 |
Method Detail
sap.ui.layout.form.FormContainer.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.layout.form.FormContainer 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.Element.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.layout.form.FormContainer.
Returns:
Adds some ariaLabelledBy into the association ariaLabelledBy
.
Parameters:
{string|sap.ui.core.Control} | vAriaLabelledBy | the ariaLabelledBy to add; if empty, nothing is inserted |
- Since:
- 1.36.0
Returns:
Adds some formElement to the aggregation formElements
.
Parameters:
Returns:
Destroys all the formElements in the aggregation formElements
.
Returns:
Destroys the title in the aggregation title
.
Returns:
Destroys the toolbar in the aggregation toolbar
.
- Since:
- 1.36.0
Returns:
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy
.
- Since:
- 1.36.0
Returns:
getExpandable(): boolean
Gets current value of property
expandable
.
Defines if the FormContainer
is expandable. Note: The expander icon will only be shown if a title
is set for the FormContainer
.
Default value is false
.
Returns:
{boolean} | Value of property expandable |
getExpanded(): boolean
Gets current value of property
expanded
.
Container is expanded. Note: This property only works if expandable
is set to true
.
Default value is true
.
Returns:
{boolean} | Value of property expanded |
Gets content of aggregation
formElements
.
The FormElements
contain the content (labels and fields) of the FormContainers
.
Returns:
Gets content of aggregation
title
.
Title of the FormContainer
. Can either be a Title
object, or a string. If a Title
object is used, the style of the title can be set.
Note: If a Toolbar
is used, the Title
is ignored.
Returns:
Gets content of aggregation
toolbar
.
Toolbar of the FormContainer
.
Note: If a Toolbar
is used, the Title
is ignored. If a title is needed inside the Toolbar
it must be added at content to the Toolbar
. In this case add the Title
to the ariaLabelledBy
association.
- Since:
- 1.36.0
Returns:
getVisible(): boolean
Gets current value of property
visible
.
If set to false
, the FormContainer
is not rendered.
Default value is true
.
Returns:
{boolean} | Value of property visible |
indexOfFormElement(oFormElement): int
Checks for the provided sap.ui.layout.form.FormElement
in the aggregation formElements
. 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 formElement into the aggregation formElements
.
Parameters:
{sap.ui.layout.form.FormElement} | oFormElement | the formElement to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the formElement should be inserted at; for a negative value of iIndex , the formElement is inserted at position 0; for a value greater than the current size of the aggregation, the formElement is inserted at the last position |
Returns:
Removes all the controls in the association named ariaLabelledBy
.
- Since:
- 1.36.0
Returns:
Removes all the controls from the aggregation
formElements
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes an ariaLabelledBy from the association named ariaLabelledBy
.
Parameters:
{int|string|sap.ui.core.Control} | vAriaLabelledBy | The ariaLabelledByto be removed or its index or ID |
- Since:
- 1.36.0
Returns:
Removes a formElement from the aggregation formElements
.
Parameters:
Returns:
Sets a new value for property
expandable
.
Defines if the FormContainer
is expandable. Note: The expander icon will only be shown if a title
is set for the FormContainer
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bExpandable | New value for property expandable |
Returns:
Sets a new value for property
expanded
.
Container is expanded. Note: This property only works if expandable
is set to true
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bExpanded | New value for property expanded |
Returns:
Sets the aggregated title
.
Parameters:
Returns:
Sets the aggregated toolbar
.
Parameters:
- Since:
- 1.36.0
Returns:
Sets a new value for property
visible
.
If set to false
, the FormContainer
is not rendered.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Parameters:
{boolean} | bVisible | New value for property visible |
Returns: