The SimpleForm
control provides an easy-to-use API to create simple forms. Inside a SimpleForm
control, a Form
control is created along with its FormContainer
elements and FormElement
elements, but the complexity in the API is not exposed to the user.
sap.ui.core.Title
element or Toolbar
control starts a new group (FormContainer
) in the form.Label
control starts a new row (FormElement
) in the form.FormElement
) that started with the last label.LayoutData
to influence the layout for special cases in the Input/Display controls.Note: If a more complex form is needed, use the Form
control instead.
Constructor for a new sap.ui.layout.form.SimpleForm.
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.layout.form.SimpleForm(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 |
---|---|---|---|
adjustLabelSpan | boolean | true | If set, the usage of If not set, the usage of Note: This property is only used if a |
backgroundDesign | sap.ui.layout.BackgroundDesign | Translucent | Specifies the background color of the The visualization of the different options depends on the used theme. |
breakpointL | int | 1024 | Breakpoint between Medium size and Large size. Note: This property is only used if a |
breakpointM | int | 600 | Breakpoint between Small size and Medium size. Note: This property is only used if a |
breakpointXL | int | 1440 | Breakpoint between Medium size and Large size. Note: This property is only used if a |
columnsL | int | 2 | Form columns for large size. The number of columns for large size must not be smaller than the number of columns for medium size. Note: This property is only used if a |
columnsM | int | 1 | Form columns for medium size. Note: This property is only used if a |
columnsXL | int | -1 | Form columns for extra large size. The number of columns for extra large size must not be smaller than the number of columns for large size. Note: This property is only used if a |
editable | boolean | Applies a device-specific and theme-specific line height and label alignment to the form rows if the form has editable content. If set, all (not only the editable) rows of the form will get the line height of editable fields. The labels inside the form will be rendered by default in the according mode. Note: The setting of this property does not change the content of the form. For example, Warning: If this property is wrongly set, this might lead to visual issues. The labels and fields might be misaligned, the labels might be rendered in the wrong mode, and the spacing between the single controls might be wrong. Also, controls that do not fit the mode might be rendered incorrectly. Visibility: public |
|
emptySpanL | int | 0 | Number of grid cells that are empty at the end of each line on large size. Note: This property is only used if a |
emptySpanM | int | 0 | Number of grid cells that are empty at the end of each line on medium size. Note: This property is only used if a |
emptySpanS | int | 0 | Number of grid cells that are empty at the end of each line on small size. Note: This property is only used if a |
emptySpanXL | int | -1 | Number of grid cells that are empty at the end of each line on extra large size. Note: This property is only used if a |
labelMinWidth | int | 192 | Specifies the min-width in pixels of the label in all form rows. Note: This property is only used if a |
labelSpanL | int | 4 | Default span for labels in large size. Note: If Note: This property is only used if |
labelSpanM | int | 2 | Default span for labels in medium size. Note: If Note: This property is only used if a |
labelSpanS | int | 12 | Default span for labels in small size. Note: This property is only used if a |
labelSpanXL | int | -1 | Default span for labels in extra large size. Note: This property is only used if a |
layout | sap.ui.layout.form.SimpleFormLayout | ResponsiveLayout | The We recommend using the Note If possible, set the Note The |
maxContainerCols | int | 2 | The maximum amount of groups ( Note: If |
minWidth | int | -1 | The overall minimum width in pixels that is used for the If the available width is below the given Note: This property is only used if a |
singleContainerFullSize | boolean | true | If the In all other cases the Note: This property is only used if a |
width | sap.ui.core.CSSSize | Width of the form. |
Default Aggregation: content
Name | Cardinality | Type | Description |
---|---|---|---|
content (default) | 0..n | sap.ui.core.Element |
The content of the form is structured in the following way:
Input uses 6 cells and the second Input uses 2 cells (using ColumnElementData ): new sap.m.Label({text:"Label"}); new sap.m.Input({value:"6 cells", layoutData: new sap.ui.layout.ColumnElementData({cellsLarge: 6, cellsSmall: 8})}), new sap.m.Input({value:"2 cells", layoutData: new sap.ui.layout.ColumnElementData({cellsLarge: 2, cellsSmall: 4})}), For example, if a new sap.m.Label({text:"Label"}); new sap.m.Input({value:"auto size"}), new sap.m.Input({value:"fix size", layoutData: new sap.ui.layout.GridData({span: "XL1 L1 M2 S4"})}), 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 labels, titles, toolbars and form controls are allowed. Views are also not supported. Allowed form controls implement the interface If editable controls are used as content, the |
form | 0..1 | sap.ui.layout.form.Form |
Hidden, for internal use only. |
title | 0..1 | sap.ui.core.Title |
Title element of the |
toolbar | 0..1 | sap.ui.core.Toolbar |
Toolbar of the Note: If a |
Name | Cardinality | Type | Description |
---|---|---|---|
ariaLabelledBy | 0..n | sap.ui.core.Control |
Association to controls / IDs which label this control (see WAI-ARIA attribute |
Method | Description |
---|---|
addAriaLabelledBy |
Adds some ariaLabelledBy into the association ariaLabelledBy. |
addContent |
Adds some content to the aggregation content. |
destroyContent |
Destroys all the content in the aggregation content. |
destroyTitle |
Destroys the title in the aggregation title. |
destroyToolbar |
Destroys the toolbar in the aggregation toolbar. |
sap.ui.layout.form.SimpleForm.extend |
Creates a new subclass of class sap.ui.layout.form.SimpleForm with name
|
getAdjustLabelSpan |
Gets current value of property adjustLabelSpan. If set, the usage of If not set, the usage of Note: This property is only used if a Default value is |
getAriaLabelledBy |
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy. |
getBackgroundDesign |
Gets current value of property backgroundDesign. Specifies the background color of the The visualization of the different options depends on the used theme. Default value is |
getBreakpointL |
Gets current value of property breakpointL. Breakpoint between Medium size and Large size. Note: This property is only used if a Default value is |
getBreakpointM |
Gets current value of property breakpointM. Breakpoint between Small size and Medium size. Note: This property is only used if a Default value is |
getBreakpointXL |
Gets current value of property breakpointXL. Breakpoint between Medium size and Large size. Note: This property is only used if a Default value is |
getColumnsL |
Gets current value of property columnsL. Form columns for large size. The number of columns for large size must not be smaller than the number of columns for medium size. Note: This property is only used if a Default value is |
getColumnsM |
Gets current value of property columnsM. Form columns for medium size. Note: This property is only used if a Default value is |
getColumnsXL |
Gets current value of property columnsXL. Form columns for extra large size. The number of columns for extra large size must not be smaller than the number of columns for large size. Note: This property is only used if a Default value is |
getContent |
Gets content of aggregation content. The content of the form is structured in the following way:
Input uses 6 cells and the second Input uses 2 cells (using ColumnElementData ): new sap.m.Label({text:"Label"}); new sap.m.Input({value:"6 cells", layoutData: new sap.ui.layout.ColumnElementData({cellsLarge: 6, cellsSmall: 8})}), new sap.m.Input({value:"2 cells", layoutData: new sap.ui.layout.ColumnElementData({cellsLarge: 2, cellsSmall: 4})}), For example, if a new sap.m.Label({text:"Label"}); new sap.m.Input({value:"auto size"}), new sap.m.Input({value:"fix size", layoutData: new sap.ui.layout.GridData({span: "XL1 L1 M2 S4"})}), 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 labels, titles, toolbars and form controls are allowed. Views are also not supported. Allowed form controls implement the interface If editable controls are used as content, the |
getEditable |
Gets current value of property editable. Applies a device-specific and theme-specific line height and label alignment to the form rows if the form has editable content. If set, all (not only the editable) rows of the form will get the line height of editable fields. The labels inside the form will be rendered by default in the according mode. Note: The setting of this property does not change the content of the form. For example, Warning: If this property is wrongly set, this might lead to visual issues. The labels and fields might be misaligned, the labels might be rendered in the wrong mode, and the spacing between the single controls might be wrong. Also, controls that do not fit the mode might be rendered incorrectly. |
getEmptySpanL |
Gets current value of property emptySpanL. Number of grid cells that are empty at the end of each line on large size. Note: This property is only used if a Default value is |
getEmptySpanM |
Gets current value of property emptySpanM. Number of grid cells that are empty at the end of each line on medium size. Note: This property is only used if a Default value is |
getEmptySpanS |
Gets current value of property emptySpanS. Number of grid cells that are empty at the end of each line on small size. Note: This property is only used if a Default value is |
getEmptySpanXL |
Gets current value of property emptySpanXL. Number of grid cells that are empty at the end of each line on extra large size. Note: This property is only used if a Default value is |
getLabelMinWidth |
Gets current value of property labelMinWidth. Specifies the min-width in pixels of the label in all form rows. Note: This property is only used if a Default value is |
getLabelSpanL |
Gets current value of property labelSpanL. Default span for labels in large size. Note: If Note: This property is only used if Default value is |
getLabelSpanM |
Gets current value of property labelSpanM. Default span for labels in medium size. Note: If Note: This property is only used if a Default value is |
getLabelSpanS |
Gets current value of property labelSpanS. Default span for labels in small size. Note: This property is only used if a Default value is |
getLabelSpanXL |
Gets current value of property labelSpanXL. Default span for labels in extra large size. Note: This property is only used if a Default value is |
getLayout |
Gets current value of property layout. The We recommend using the Note If possible, set the Note The Default value is |
getMaxContainerCols |
Gets current value of property maxContainerCols. The maximum amount of groups ( Note: If Default value is |
sap.ui.layout.form.SimpleForm.getMetadata |
Returns a metadata object for class sap.ui.layout.form.SimpleForm. |
getMinWidth |
Gets current value of property minWidth. The overall minimum width in pixels that is used for the If the available width is below the given Note: This property is only used if a Default value is |
getSingleContainerFullSize |
Gets current value of property singleContainerFullSize. If the In all other cases the Note: This property is only used if a Default value is |
getTitle |
Gets content of aggregation title. Title element of the |
getToolbar |
Gets content of aggregation toolbar. Toolbar of the Note: If a |
getWidth |
Gets current value of property width. Width of the form. |
indexOfContent |
Checks for the provided |
insertContent |
Inserts a content into the aggregation content. |
removeAllAriaLabelledBy |
Removes all the controls in the association named ariaLabelledBy. |
removeAllContent |
Removes all the controls from the aggregation content. Additionally, it unregisters them from the hosting UIArea. |
removeAriaLabelledBy |
Removes an ariaLabelledBy from the association named ariaLabelledBy. |
removeContent |
Removes a content from the aggregation content. |
setAdjustLabelSpan |
Sets a new value for property adjustLabelSpan. If set, the usage of If not set, the usage of Note: This property is only used if a When called with a value of Default value is |
setBackgroundDesign |
Sets a new value for property backgroundDesign. Specifies the background color of the The visualization of the different options depends on the used theme. When called with a value of Default value is |
setBreakpointL |
Sets a new value for property breakpointL. Breakpoint between Medium size and Large size. Note: This property is only used if a When called with a value of Default value is |
setBreakpointM |
Sets a new value for property breakpointM. Breakpoint between Small size and Medium size. Note: This property is only used if a When called with a value of Default value is |
setBreakpointXL |
Sets a new value for property breakpointXL. Breakpoint between Medium size and Large size. Note: This property is only used if a When called with a value of Default value is |
setColumnsL |
Sets a new value for property columnsL. Form columns for large size. The number of columns for large size must not be smaller than the number of columns for medium size. Note: This property is only used if a When called with a value of Default value is |
setColumnsM |
Sets a new value for property columnsM. Form columns for medium size. Note: This property is only used if a When called with a value of Default value is |
setColumnsXL |
Sets a new value for property columnsXL. Form columns for extra large size. The number of columns for extra large size must not be smaller than the number of columns for large size. Note: This property is only used if a When called with a value of Default value is |
setEditable |
Sets a new value for property editable. Applies a device-specific and theme-specific line height and label alignment to the form rows if the form has editable content. If set, all (not only the editable) rows of the form will get the line height of editable fields. The labels inside the form will be rendered by default in the according mode. Note: The setting of this property does not change the content of the form. For example, Warning: If this property is wrongly set, this might lead to visual issues. The labels and fields might be misaligned, the labels might be rendered in the wrong mode, and the spacing between the single controls might be wrong. Also, controls that do not fit the mode might be rendered incorrectly. When called with a value of |
setEmptySpanL |
Sets a new value for property emptySpanL. Number of grid cells that are empty at the end of each line on large size. Note: This property is only used if a When called with a value of Default value is |
setEmptySpanM |
Sets a new value for property emptySpanM. Number of grid cells that are empty at the end of each line on medium size. Note: This property is only used if a When called with a value of Default value is |
setEmptySpanS |
Sets a new value for property emptySpanS. Number of grid cells that are empty at the end of each line on small size. Note: This property is only used if a When called with a value of Default value is |
setEmptySpanXL |
Sets a new value for property emptySpanXL. Number of grid cells that are empty at the end of each line on extra large size. Note: This property is only used if a When called with a value of Default value is |
setLabelMinWidth |
Sets a new value for property labelMinWidth. Specifies the min-width in pixels of the label in all form rows. Note: This property is only used if a When called with a value of Default value is |
setLabelSpanL |
Sets a new value for property labelSpanL. Default span for labels in large size. Note: If Note: This property is only used if When called with a value of Default value is |
setLabelSpanM |
Sets a new value for property labelSpanM. Default span for labels in medium size. Note: If Note: This property is only used if a When called with a value of Default value is |
setLabelSpanS |
Sets a new value for property labelSpanS. Default span for labels in small size. Note: This property is only used if a When called with a value of Default value is |
setLabelSpanXL |
Sets a new value for property labelSpanXL. Default span for labels in extra large size. Note: This property is only used if a When called with a value of Default value is |
setLayout |
Sets a new value for property layout. The We recommend using the Note If possible, set the Note The When called with a value of Default value is |
setMaxContainerCols |
Sets a new value for property maxContainerCols. The maximum amount of groups ( Note: If When called with a value of Default value is |
setMinWidth |
Sets a new value for property minWidth. The overall minimum width in pixels that is used for the If the available width is below the given Note: This property is only used if a When called with a value of Default value is |
setSingleContainerFullSize |
Sets a new value for property singleContainerFullSize. If the In all other cases the Note: This property is only used if a When called with a value of Default value is |
setTitle |
Sets the aggregated title. |
setToolbar |
Sets the aggregated toolbar. |
setWidth |
Sets a new value for property width. Width of the form. When called with a value of |
Adds some ariaLabelledBy into the association ariaLabelledBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaLabelledBy | sap.ui.core.ID sap.ui.core.Control |
The ariaLabelledBy to add; if empty, nothing is inserted |
Adds some content to the aggregation content.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.core.Element |
The content to add; if empty, nothing is inserted |
Creates a new subclass of class sap.ui.layout.form.SimpleForm 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.
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 |
Gets current value of property adjustLabelSpan.
If set, the usage of labelSpanL
and labelSpanM
are dependent on the number of FormContainers
in one row. If only one FormContainer
is displayed in one row, labelSpanM
is used to define the size of the label. This is the same for medium and large Forms
. This is done to align the labels on forms where full-size FormContainers
and multiple-column rows are used in the same Form
(because every FormContainer
has its own grid inside).
If not set, the usage of labelSpanL
and labelSpanM
are dependent on the Form
size. The number of FormContainers
doesn't matter in this case.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout.
Default value is true
.
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Gets current value of property backgroundDesign.
Specifies the background color of the SimpleForm
content.
The visualization of the different options depends on the used theme.
Default value is Translucent
.
Gets current value of property breakpointL.
Breakpoint between Medium size and Large size.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout.
Default value is 1024
.
Gets current value of property breakpointM.
Breakpoint between Small size and Medium size.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout.
Default value is 600
.
Gets current value of property breakpointXL.
Breakpoint between Medium size and Large size.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout.
Default value is 1440
.
Gets current value of property columnsL.
Form columns for large size. The number of columns for large size must not be smaller than the number of columns for medium size.
Note: This property is only used if a ResponsiveGridLayout
or a ColumnLayout
is used as a layout.
Default value is 2
.
Gets current value of property columnsM.
Form columns for medium size.
Note: This property is only used if a ResponsiveGridLayout
or a ColumnLayout
is used as a layout.
Default value is 1
.
Gets current value of property columnsXL.
Form columns for extra large size. The number of columns for extra large size must not be smaller than the number of columns for large size.
Note: This property is only used if a ResponsiveGridLayout
or a ColumnLayout
is used as a layout. If the default value -1 is not overwritten with the meaningful one then the columnsL
value is used (from the backward compatibility reasons).
Default value is -1
.
Gets content of aggregation content.
The content of the form is structured in the following way:
sap.ui.core.Title
element or Toolbar
control to start a new group (FormContainer
).Label
control to start a new row (FormElement
).LayoutData
to influence the layout for special cases in the single controls. For example, if a ColumnLayout
is used as a layout, the form content is weighted using 4 cells for the labels and 8 cells for the field part, for large size. If there is only little space, the labels are above the fields and each field uses 12 cells. If your input controls should influence their width, you can add sap.ui.layout.ColumnElementData
to them via setLayoutData
method. Ensure that the sum of the weights in the ColumnElementData
is not more than 12, as this is the total width of the input control part of each form row.Input
uses 6 cells and the second Input
uses 2 cells (using ColumnElementData
): new sap.m.Label({text:"Label"}); new sap.m.Input({value:"6 cells", layoutData: new sap.ui.layout.ColumnElementData({cellsLarge: 6, cellsSmall: 8})}), new sap.m.Input({value:"2 cells", layoutData: new sap.ui.layout.ColumnElementData({cellsLarge: 2, cellsSmall: 4})}),
For example, if a ResponsiveGridLayout
is used as a layout, there are 12 cells in one row. Depending on the screen size the labels use the defined labelSpan
. The remaining cells are used for the fields (and emptySpan
if defined). The available cells are distributed to all fields in the row. If one field should use a fixed number of cells you can add sap.ui.layout.GridData
to them via setLayoutData
method. If there are additional fields in the row they will get the remaining cells. Example for a row with two Input
controls where one uses four cells on small screens, one cell on medium screens and 2 cells on larger screens (using ResponsiveGridLayout
):
new sap.m.Label({text:"Label"}); new sap.m.Input({value:"auto size"}), new sap.m.Input({value:"fix size", layoutData: new sap.ui.layout.GridData({span: "XL1 L1 M2 S4"})}),
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 labels, titles, toolbars and form controls are allowed. Views are also not supported. Allowed form controls implement the interface sap.ui.core.IFormContent
.
If editable controls are used as content, the editable
property must be set to true
, otherwise to false
. If the editable
property is set incorrectly, there will be visual issues like wrong label alignment or wrong spacing between the controls.
Gets current value of property editable.
Applies a device-specific and theme-specific line height and label alignment to the form rows if the form has editable content. If set, all (not only the editable) rows of the form will get the line height of editable fields.
The labels inside the form will be rendered by default in the according mode.
Note: The setting of this property does not change the content of the form. For example, Input
controls in a form with editable
set to false are still editable.
Warning: If this property is wrongly set, this might lead to visual issues. The labels and fields might be misaligned, the labels might be rendered in the wrong mode, and the spacing between the single controls might be wrong. Also, controls that do not fit the mode might be rendered incorrectly.
Gets current value of property emptySpanL.
Number of grid cells that are empty at the end of each line on large size.
Note: This property is only used if a ResponsiveGridLayout
or a ColumnLayout
is used as a layout. If a ColumnLayout
is used, this property defines the empty cells for large columns.
Default value is 0
.
Gets current value of property emptySpanM.
Number of grid cells that are empty at the end of each line on medium size.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout.
Default value is 0
.
Gets current value of property emptySpanS.
Number of grid cells that are empty at the end of each line on small size.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout.
Default value is 0
.
Gets current value of property emptySpanXL.
Number of grid cells that are empty at the end of each line on extra large size.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout. If the default value -1 is not overwritten with the meaningful one then the emptySpanL
value is used (from the backward compatibility reasons).
Default value is -1
.
Gets current value of property labelMinWidth.
Specifies the min-width in pixels of the label in all form rows.
Note: This property is only used if a ResponsiveLayout
is used as a layout.
Default value is 192
.
Gets current value of property labelSpanL.
Default span for labels in large size.
Note: If adjustLabelSpan
is set, this property is only used if more than 1 FormContainer
is in one line. If only 1 FormContainer
is in the line, then the labelSpanM
value is used.
Note: This property is only used if ResponsiveGridLayout
or ColumnLayout
is used as a layout. If a ColumnLayout
is used, this property defines the label size for large columns.
Default value is 4
.
Gets current value of property labelSpanM.
Default span for labels in medium size.
Note: If adjustLabelSpan
is set, this property is used for full-size FormContainers
. If more than one FormContainer
is in one line, labelSpanL
is used.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout.
Default value is 2
.
Gets current value of property labelSpanS.
Default span for labels in small size.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout.
Default value is 12
.
Gets current value of property labelSpanXL.
Default span for labels in extra large size.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout. If the default value -1 is not overwritten with the meaningful one then the labelSpanL
value is used (from the backward compatibility reasons).
Default value is -1
.
Gets current value of property layout.
The FormLayout
that is used to render the SimpleForm
.
We recommend using the ColumnLayout
for rendering a SimpleForm
, as its responsiveness uses the space available in the best way possible.
Note If possible, set the layout
before adding content to prevent calculations for the default layout.
Note The ResponsiveLayout
has been deprecated and must no longer be used. For compatibility reasons the default could not be changed.
Default value is ResponsiveLayout
.
Gets current value of property maxContainerCols.
The maximum amount of groups (FormContainers
) per row that is used before a new row is started.
Note: If sap.ui.layout.form.SimpleFormLayout.ResponsiveGridLayout
is used as layout
, this property is not used. Please use the properties ColumnsL
and ColumnsM
in this case.
Default value is 2
.
Returns a metadata object for class sap.ui.layout.form.SimpleForm.
Gets current value of property minWidth.
The overall minimum width in pixels that is used for the SimpleForm
.
If the available width is below the given minWidth
the SimpleForm
will create a new row for the next group (FormContainer
). The default value is -1, meaning that inner groups (FormContainers
) will be stacked until maxContainerCols
is reached, irrespective of whether a width
is reached or the available parents width is reached.
Note: This property is only used if a ResponsiveLayout
is used as a layout.
Default value is -1
.
Gets current value of property singleContainerFullSize.
If the Form
contains only one single FormContainer
and this property is set, the FormContainer
is displayed using the full size of the Form
. In this case the properties columnsL
and columnsM
are ignored.
In all other cases the FormContainer
is displayed in the size of one column.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout.
Default value is true
.
Gets content of aggregation title.
Title element of the SimpleForm
. Can either be a Title
element, or a string.
Gets content of aggregation toolbar.
Toolbar of the SimpleForm
.
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.
Checks for the provided sap.ui.core.Element
in the aggregation content. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.core.Element |
The content whose index is looked for |
Inserts a content into the aggregation content.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.core.Element |
The content to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
Removes all the controls from the aggregation content.
Additionally, it unregisters them from the hosting UIArea.
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaLabelledBy | int sap.ui.core.ID sap.ui.core.Control |
The ariaLabelledBy to be removed or its index or ID |
Removes a content from the aggregation content.
Param | Type | DefaultValue | Description |
---|---|---|---|
vContent | int string sap.ui.core.Element |
The content to remove or its index or id |
Sets a new value for property adjustLabelSpan.
If set, the usage of labelSpanL
and labelSpanM
are dependent on the number of FormContainers
in one row. If only one FormContainer
is displayed in one row, labelSpanM
is used to define the size of the label. This is the same for medium and large Forms
. This is done to align the labels on forms where full-size FormContainers
and multiple-column rows are used in the same Form
(because every FormContainer
has its own grid inside).
If not set, the usage of labelSpanL
and labelSpanM
are dependent on the Form
size. The number of FormContainers
doesn't matter in this case.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bAdjustLabelSpan | boolean | true |
New value for property |
Sets a new value for property backgroundDesign.
Specifies the background color of the SimpleForm
content.
The visualization of the different options depends on the used theme.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Translucent
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sBackgroundDesign | sap.ui.layout.BackgroundDesign | Translucent |
New value for property |
Sets a new value for property breakpointL.
Breakpoint between Medium size and Large size.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 1024
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iBreakpointL | int | 1024 |
New value for property |
Sets a new value for property breakpointM.
Breakpoint between Small size and Medium size.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 600
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iBreakpointM | int | 600 |
New value for property |
Sets a new value for property breakpointXL.
Breakpoint between Medium size and Large size.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 1440
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iBreakpointXL | int | 1440 |
New value for property |
Sets a new value for property columnsL.
Form columns for large size. The number of columns for large size must not be smaller than the number of columns for medium size.
Note: This property is only used if a ResponsiveGridLayout
or a ColumnLayout
is used as a layout.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 2
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iColumnsL | int | 2 |
New value for property |
Sets a new value for property columnsM.
Form columns for medium size.
Note: This property is only used if a ResponsiveGridLayout
or a ColumnLayout
is used as a layout.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 1
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iColumnsM | int | 1 |
New value for property |
Sets a new value for property columnsXL.
Form columns for extra large size. The number of columns for extra large size must not be smaller than the number of columns for large size.
Note: This property is only used if a ResponsiveGridLayout
or a ColumnLayout
is used as a layout. If the default value -1 is not overwritten with the meaningful one then the columnsL
value is used (from the backward compatibility reasons).
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is -1
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iColumnsXL | int | -1 |
New value for property |
Sets a new value for property editable.
Applies a device-specific and theme-specific line height and label alignment to the form rows if the form has editable content. If set, all (not only the editable) rows of the form will get the line height of editable fields.
The labels inside the form will be rendered by default in the according mode.
Note: The setting of this property does not change the content of the form. For example, Input
controls in a form with editable
set to false are still editable.
Warning: If this property is wrongly set, this might lead to visual issues. The labels and fields might be misaligned, the labels might be rendered in the wrong mode, and the spacing between the single controls might be wrong. Also, controls that do not fit the mode might be rendered incorrectly.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
bEditable | boolean |
New value for property |
Sets a new value for property emptySpanL.
Number of grid cells that are empty at the end of each line on large size.
Note: This property is only used if a ResponsiveGridLayout
or a ColumnLayout
is used as a layout. If a ColumnLayout
is used, this property defines the empty cells for large columns.
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 |
---|---|---|---|
iEmptySpanL | int | 0 |
New value for property |
Sets a new value for property emptySpanM.
Number of grid cells that are empty at the end of each line on medium size.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout.
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 |
---|---|---|---|
iEmptySpanM | int | 0 |
New value for property |
Sets a new value for property emptySpanS.
Number of grid cells that are empty at the end of each line on small size.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout.
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 |
---|---|---|---|
iEmptySpanS | int | 0 |
New value for property |
Sets a new value for property emptySpanXL.
Number of grid cells that are empty at the end of each line on extra large size.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout. If the default value -1 is not overwritten with the meaningful one then the emptySpanL
value is used (from the backward compatibility reasons).
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is -1
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iEmptySpanXL | int | -1 |
New value for property |
Sets a new value for property labelMinWidth.
Specifies the min-width in pixels of the label in all form rows.
Note: This property is only used if a ResponsiveLayout
is used as a layout.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 192
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iLabelMinWidth | int | 192 |
New value for property |
Sets a new value for property labelSpanL.
Default span for labels in large size.
Note: If adjustLabelSpan
is set, this property is only used if more than 1 FormContainer
is in one line. If only 1 FormContainer
is in the line, then the labelSpanM
value is used.
Note: This property is only used if ResponsiveGridLayout
or ColumnLayout
is used as a layout. If a ColumnLayout
is used, this property defines the label size for large columns.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 4
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iLabelSpanL | int | 4 |
New value for property |
Sets a new value for property labelSpanM.
Default span for labels in medium size.
Note: If adjustLabelSpan
is set, this property is used for full-size FormContainers
. If more than one FormContainer
is in one line, labelSpanL
is used.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 2
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iLabelSpanM | int | 2 |
New value for property |
Sets a new value for property labelSpanS.
Default span for labels in small size.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 12
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iLabelSpanS | int | 12 |
New value for property |
Sets a new value for property labelSpanXL.
Default span for labels in extra large size.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout. If the default value -1 is not overwritten with the meaningful one then the labelSpanL
value is used (from the backward compatibility reasons).
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is -1
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iLabelSpanXL | int | -1 |
New value for property |
Sets a new value for property layout.
The FormLayout
that is used to render the SimpleForm
.
We recommend using the ColumnLayout
for rendering a SimpleForm
, as its responsiveness uses the space available in the best way possible.
Note If possible, set the layout
before adding content to prevent calculations for the default layout.
Note The ResponsiveLayout
has been deprecated and must no longer be used. For compatibility reasons the default could not be changed.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is ResponsiveLayout
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sLayout | sap.ui.layout.form.SimpleFormLayout | ResponsiveLayout |
New value for property |
Sets a new value for property maxContainerCols.
The maximum amount of groups (FormContainers
) per row that is used before a new row is started.
Note: If sap.ui.layout.form.SimpleFormLayout.ResponsiveGridLayout
is used as layout
, this property is not used. Please use the properties ColumnsL
and ColumnsM
in this case.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is 2
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iMaxContainerCols | int | 2 |
New value for property |
Sets a new value for property minWidth.
The overall minimum width in pixels that is used for the SimpleForm
.
If the available width is below the given minWidth
the SimpleForm
will create a new row for the next group (FormContainer
). The default value is -1, meaning that inner groups (FormContainers
) will be stacked until maxContainerCols
is reached, irrespective of whether a width
is reached or the available parents width is reached.
Note: This property is only used if a ResponsiveLayout
is used as a layout.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is -1
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iMinWidth | int | -1 |
New value for property |
Sets a new value for property singleContainerFullSize.
If the Form
contains only one single FormContainer
and this property is set, the FormContainer
is displayed using the full size of the Form
. In this case the properties columnsL
and columnsM
are ignored.
In all other cases the FormContainer
is displayed in the size of one column.
Note: This property is only used if a ResponsiveGridLayout
is used as a layout.
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is true
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bSingleContainerFullSize | boolean | true |
New value for property |
Sets the aggregated title.
Param | Type | DefaultValue | Description |
---|---|---|---|
vTitle | sap.ui.core.Title string |
The title to set |
Sets the aggregated toolbar.
Param | Type | DefaultValue | Description |
---|---|---|---|
oToolbar | sap.ui.core.Toolbar |
The toolbar to set |
Sets a new value for property width.
Width of the form.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sWidth | sap.ui.core.CSSSize |
New value for property |