Class sap.ui.layout.form.SimpleFormModule: sap/ui/layout/form/SimpleForm

extends Control
known direct subclasses: SimpleForm

The SimpleForm provides an easy-to-use API to create simple forms. Inside a SimpleForm, a Form control is created along with its FormContainers and FormElements, but the complexity in the API is removed.

  • A new Title or Toolbar starts a new group (FormContainer) in the form.
  • A new Label starts a new row (FormElement) in the form.
  • All other controls will be assigned to the row (FormElement) that started with the last label.

Use LayoutData to influence the layout for special cases in the Input/Display controls.

Note: If a more complex form is needed, use Form instead.


Since: 1.16.0.
Constructor Summary
new sap.ui.layout.form.SimpleForm(sId?, mSettings?)Constructor for a new sap.ui.layout.form.SimpleForm.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.layout.form.SimpleForm.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.layout.form.SimpleForm with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.layout.form.SimpleForm.getMetadata()Returns a metadata object for class sap.ui.layout.form.SimpleForm.
addAriaLabelledBy(vAriaLabelledBy)Adds some ariaLabelledBy into the association ariaLabelledBy.
addContent(oContent)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.
getAdjustLabelSpan()Gets current value of property adjustLabelSpan.
getAriaLabelledBy()Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
getBackgroundDesign()Gets current value of property backgroundDesign.
getBreakpointL()Gets current value of property breakpointL.
getBreakpointM()Gets current value of property breakpointM.
getBreakpointXL()Gets current value of property breakpointXL.
getColumnsL()Gets current value of property columnsL.
getColumnsM()Gets current value of property columnsM.
getColumnsXL()Gets current value of property columnsXL.
getContent()Gets content of aggregation content.
getEditable()Gets current value of property editable.
getEmptySpanL()Gets current value of property emptySpanL.
getEmptySpanM()Gets current value of property emptySpanM.
getEmptySpanS()Gets current value of property emptySpanS.
getEmptySpanXL()Gets current value of property emptySpanXL.
getLabelMinWidth()Gets current value of property labelMinWidth.
getLabelSpanL()Gets current value of property labelSpanL.
getLabelSpanM()Gets current value of property labelSpanM.
getLabelSpanS()Gets current value of property labelSpanS.
getLabelSpanXL()Gets current value of property labelSpanXL.
getLayout()Gets current value of property layout.
getMaxContainerCols()Gets current value of property maxContainerCols.
getMinWidth()Gets current value of property minWidth.
getSingleContainerFullSize()Gets current value of property singleContainerFullSize.
getTitle()Gets content of aggregation title.
getToolbar()Gets content of aggregation toolbar.
getWidth()Gets current value of property width.
indexOfContent(oContent)Checks for the provided sap.ui.core.Element in the aggregation content.
insertContent(oContent, iIndex)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.
removeAriaLabelledBy(vAriaLabelledBy)Removes an ariaLabelledBy from the association named ariaLabelledBy.
removeContent(vContent)Removes a content from the aggregation content.
setAdjustLabelSpan(bAdjustLabelSpan)Sets a new value for property adjustLabelSpan.
setBackgroundDesign(sBackgroundDesign)Sets a new value for property backgroundDesign.
setBreakpointL(iBreakpointL)Sets a new value for property breakpointL.
setBreakpointM(iBreakpointM)Sets a new value for property breakpointM.
setBreakpointXL(iBreakpointXL)Sets a new value for property breakpointXL.
setColumnsL(iColumnsL)Sets a new value for property columnsL.
setColumnsM(iColumnsM)Sets a new value for property columnsM.
setColumnsXL(iColumnsXL)Sets a new value for property columnsXL.
setEditable(bEditable)Sets a new value for property editable.
setEmptySpanL(iEmptySpanL)Sets a new value for property emptySpanL.
setEmptySpanM(iEmptySpanM)Sets a new value for property emptySpanM.
setEmptySpanS(iEmptySpanS)Sets a new value for property emptySpanS.
setEmptySpanXL(iEmptySpanXL)Sets a new value for property emptySpanXL.
setLabelMinWidth(iLabelMinWidth)Sets a new value for property labelMinWidth.
setLabelSpanL(iLabelSpanL)Sets a new value for property labelSpanL.
setLabelSpanM(iLabelSpanM)Sets a new value for property labelSpanM.
setLabelSpanS(iLabelSpanS)Sets a new value for property labelSpanS.
setLabelSpanXL(iLabelSpanXL)Sets a new value for property labelSpanXL.
setLayout(sLayout)Sets a new value for property layout.
setMaxContainerCols(iMaxContainerCols)Sets a new value for property maxContainerCols.
setMinWidth(iMinWidth)Sets a new value for property minWidth.
setSingleContainerFullSize(bSingleContainerFullSize)Sets a new value for property singleContainerFullSize.
setTitle(vTitle)Sets the aggregated title.
setToolbar(oToolbar)Sets the aggregated toolbar.
setWidth(sWidth)Sets a new value for property width.
Constructor Detail
new sap.ui.layout.form.SimpleForm(sId?, mSettings?)

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 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:
stringsId?ID for the new control, generated automatically if no ID is given
objectmSettings?Initial settings for the new control
Method Detail
sap.ui.layout.form.SimpleForm.extend(sClassName, oClassInfo?, FNMetaImpl?): function

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.

Parameters:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated class / constructor function
sap.ui.layout.form.SimpleForm.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.layout.form.SimpleForm.
Returns:
sap.ui.base.MetadataMetadata object describing this class
addAriaLabelledBy(vAriaLabelledBy): sap.ui.layout.form.SimpleForm
Adds some ariaLabelledBy into the association ariaLabelledBy.
Parameters:
sap.ui.core.ID|sap.ui.core.ControlvAriaLabelledBythe ariaLabelledBy to add; if empty, nothing is inserted
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.32.0
addContent(oContent): sap.ui.layout.form.SimpleForm
Adds some content to the aggregation content.
Parameters:
sap.ui.core.ElementoContentthe content to add; if empty, nothing is inserted
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Destroys all the content in the aggregation content.
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Destroys the title in the aggregation title.
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.16.3
Destroys the toolbar in the aggregation toolbar.
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.36.0
getAdjustLabelSpan(): boolean

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:
booleanValue of property adjustLabelSpan
Since:
1.34.0
getAriaLabelledBy(): sap.ui.core.ID[]
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Returns:
sap.ui.core.ID[]
Since:
1.32.0
getBackgroundDesign(): sap.ui.layout.BackgroundDesign

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.

Returns:
sap.ui.layout.BackgroundDesignValue of property backgroundDesign
Since:
1.36.0
getBreakpointL(): int

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.

Returns:
intValue of property breakpointL
Since:
1.16.3
getBreakpointM(): int

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.

Returns:
intValue of property breakpointM
Since:
1.16.3
getBreakpointXL(): int

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.

Returns:
intValue of property breakpointXL
Since:
1.34.0
getColumnsL(): int

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 is used as a layout.

Default value is 2.

Returns:
intValue of property columnsL
Since:
1.16.3
getColumnsM(): int

Gets current value of property columnsM.

Form columns for medium size.

Note: This property is only used if a ResponsiveGridLayout is used as a layout.

Default value is 1.

Returns:
intValue of property columnsM
Since:
1.16.3
getColumnsXL(): int

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

Returns:
intValue of property columnsXL
Since:
1.34.0
getContent(): sap.ui.core.Element[]

Gets content of aggregation content.

The content of the form is structured in the following way:

  • Add a Title or Toolbar control to start a new group (FormContainer).
  • Add a Label control to start a new row (FormElement).
  • Add controls as input fields, text fields or other as needed.
  • Use LayoutData to influence the layout for special cases in the single controls. For example, if a ResponsiveLayout is used as a layout, the form content is weighted using weight 3 for the labels and weight 5 for the fields part. By default the label column is 192 pixels wide. If your input controls should influence their width, you can add sap.ui.layout.ResponsiveFlowLayoutData to them via setLayoutData method. Ensure that the sum of the weights in the ResponsiveFlowLayoutData is not more than 5, as this is the total width of the input control part of each form row.

Example for a row where the Input weight 4 and the second Input weight 1 (using ResponsiveLayout):

new sap.m.Label({text:"Label"});
new sap.m.Input({value:"Weight 4", layoutData: new sap.ui.layout.ResponsiveFlowLayoutData({weight:4})}),
new sap.m.Input({value:"Weight 1", layoutData: new sap.ui.layout.ResponsiveFlowLayoutData({weight:1})}),

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"})}),

Note: Do not put any layout controls in here. This could destroy the visual layout, keyboard support and screen-reader support.

Returns:
sap.ui.core.Element[]
getEditable(): boolean

Gets current value of property editable.

Applies a device-specific and theme-specific line-height 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 accessibility aria-readonly attribute is set according to this property.

Note: The setting of the property has no influence on the editable functionality of the form's content.

Returns:
booleanValue of property editable
getEmptySpanL(): int

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 is used as a layout.

Default value is 0.

Returns:
intValue of property emptySpanL
Since:
1.16.3
getEmptySpanM(): int

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.

Returns:
intValue of property emptySpanM
Since:
1.16.3
getEmptySpanS(): int

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.

Returns:
intValue of property emptySpanS
Since:
1.16.3
getEmptySpanXL(): int

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.

Returns:
intValue of property emptySpanXL
Since:
1.34.0
getLabelMinWidth(): int

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.

Returns:
intValue of property labelMinWidth
getLabelSpanL(): int

Gets current value of property labelSpanL.

Default span for labels in large size.

Note: If adjustLabelSpanThis 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 a ResponsiveGridLayout is used as a layout.

Default value is 4.

Returns:
intValue of property labelSpanL
Since:
1.16.3
getLabelSpanM(): int

Gets current value of property labelSpanM.

Default span for labels in medium size.

Note: If adjustLabelSpanThis 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.

Returns:
intValue of property labelSpanM
Since:
1.16.3
getLabelSpanS(): int

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.

Returns:
intValue of property labelSpanS
Since:
1.16.3
getLabelSpanXL(): int

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.

Returns:
intValue of property labelSpanXL
Since:
1.34.0

Gets current value of property layout.

The FormLayout that is used to render the SimpleForm.

We recommend using the ResponsiveGridLayout for rendering a SimpleForm, as its responsiveness uses the space available in the best way possible.

Default value is ResponsiveLayout.

Returns:
sap.ui.layout.form.SimpleFormLayoutValue of property layout
getMaxContainerCols(): int

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 a ResponsiveGridLayout is used as a layout, this property is not used. Please use the properties ColumnsL and ColumnsM in this case.

Default value is 2.

Returns:
intValue of property maxContainerCols
getMinWidth(): int

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.

Returns:
intValue of property minWidth
getSingleContainerFullSize(): boolean

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.

Returns:
booleanValue of property singleContainerFullSize
Since:
1.34.0
getTitle(): sap.ui.core.Title|string

Gets content of aggregation title.

Title element of the SimpleForm. Can either be a Title element, or a string.

Returns:
sap.ui.core.Title|string
Since:
1.16.3
getToolbar(): sap.ui.core.Toolbar

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.

Returns:
sap.ui.core.Toolbar
Since:
1.36.0
getWidth(): sap.ui.core.CSSSize

Gets current value of property width.

Width of the form.

Returns:
sap.ui.core.CSSSizeValue of property width
Since:
1.28.0
indexOfContent(oContent): int
Checks for the provided sap.ui.core.Element in the aggregation content. and returns its index if found or -1 otherwise.
Parameters:
sap.ui.core.ElementoContentThe content whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
insertContent(oContent, iIndex): sap.ui.layout.form.SimpleForm
Inserts a content into the aggregation content.
Parameters:
sap.ui.core.ElementoContentthe content to insert; if empty, nothing is inserted
intiIndexthe 0-based index the content should be inserted at; for a negative value of iIndex, the content is inserted at position 0; for a value greater than the current size of the aggregation, the content is inserted at the last position
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
removeAllAriaLabelledBy(): sap.ui.core.ID[]
Removes all the controls in the association named ariaLabelledBy.
Returns:
sap.ui.core.ID[]An array of the removed elements (might be empty)
Since:
1.32.0
removeAllContent(): sap.ui.core.Element[]

Removes all the controls from the aggregation content.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.ui.core.Element[]An array of the removed elements (might be empty)
removeAriaLabelledBy(vAriaLabelledBy): sap.ui.core.ID
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Parameters:
int|sap.ui.core.ID|sap.ui.core.ControlvAriaLabelledByThe ariaLabelledBy to be removed or its index or ID
Returns:
sap.ui.core.IDThe removed ariaLabelledBy or null
Since:
1.32.0
removeContent(vContent): sap.ui.core.Element
Removes a content from the aggregation content.
Parameters:
int|string|sap.ui.core.ElementvContentThe content to remove or its index or id
Returns:
sap.ui.core.ElementThe removed content or null
setAdjustLabelSpan(bAdjustLabelSpan): sap.ui.layout.form.SimpleForm

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.

Parameters:
booleanbAdjustLabelSpanNew value for property adjustLabelSpan
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.34.0
setBackgroundDesign(sBackgroundDesign): sap.ui.layout.form.SimpleForm

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.

Parameters:
sap.ui.layout.BackgroundDesignsBackgroundDesignNew value for property backgroundDesign
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.36.0
setBreakpointL(iBreakpointL): sap.ui.layout.form.SimpleForm

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.

Parameters:
intiBreakpointLNew value for property breakpointL
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.16.3
setBreakpointM(iBreakpointM): sap.ui.layout.form.SimpleForm

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.

Parameters:
intiBreakpointMNew value for property breakpointM
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.16.3
setBreakpointXL(iBreakpointXL): sap.ui.layout.form.SimpleForm

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.

Parameters:
intiBreakpointXLNew value for property breakpointXL
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.34.0
setColumnsL(iColumnsL): sap.ui.layout.form.SimpleForm

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

Parameters:
intiColumnsLNew value for property columnsL
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.16.3
setColumnsM(iColumnsM): sap.ui.layout.form.SimpleForm

Sets a new value for property columnsM.

Form columns for 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 1.

Parameters:
intiColumnsMNew value for property columnsM
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.16.3
setColumnsXL(iColumnsXL): sap.ui.layout.form.SimpleForm

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

Parameters:
intiColumnsXLNew value for property columnsXL
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.34.0
setEditable(bEditable): sap.ui.layout.form.SimpleForm

Sets a new value for property editable.

Applies a device-specific and theme-specific line-height 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 accessibility aria-readonly attribute is set according to this property.

Note: The setting of the property has no influence on the editable functionality of the form's content.

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

Parameters:
booleanbEditableNew value for property editable
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
setEmptySpanL(iEmptySpanL): sap.ui.layout.form.SimpleForm

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

Parameters:
intiEmptySpanLNew value for property emptySpanL
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.16.3
setEmptySpanM(iEmptySpanM): sap.ui.layout.form.SimpleForm

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.

Parameters:
intiEmptySpanMNew value for property emptySpanM
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.16.3
setEmptySpanS(iEmptySpanS): sap.ui.layout.form.SimpleForm

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.

Parameters:
intiEmptySpanSNew value for property emptySpanS
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.16.3
setEmptySpanXL(iEmptySpanXL): sap.ui.layout.form.SimpleForm

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.

Parameters:
intiEmptySpanXLNew value for property emptySpanXL
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.34.0
setLabelMinWidth(iLabelMinWidth): sap.ui.layout.form.SimpleForm

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.

Parameters:
intiLabelMinWidthNew value for property labelMinWidth
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
setLabelSpanL(iLabelSpanL): sap.ui.layout.form.SimpleForm

Sets a new value for property labelSpanL.

Default span for labels in large size.

Note: If adjustLabelSpanThis 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 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 4.

Parameters:
intiLabelSpanLNew value for property labelSpanL
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.16.3
setLabelSpanM(iLabelSpanM): sap.ui.layout.form.SimpleForm

Sets a new value for property labelSpanM.

Default span for labels in medium size.

Note: If adjustLabelSpanThis 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.

Parameters:
intiLabelSpanMNew value for property labelSpanM
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.16.3
setLabelSpanS(iLabelSpanS): sap.ui.layout.form.SimpleForm

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.

Parameters:
intiLabelSpanSNew value for property labelSpanS
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.16.3
setLabelSpanXL(iLabelSpanXL): sap.ui.layout.form.SimpleForm

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.

Parameters:
intiLabelSpanXLNew value for property labelSpanXL
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.34.0
setLayout(sLayout): sap.ui.layout.form.SimpleForm

Sets a new value for property layout.

The FormLayout that is used to render the SimpleForm.

We recommend using the ResponsiveGridLayout for rendering a SimpleForm, as its responsiveness uses the space available in the best way possible.

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

Default value is ResponsiveLayout.

Parameters:
sap.ui.layout.form.SimpleFormLayoutsLayoutNew value for property layout
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
setMaxContainerCols(iMaxContainerCols): sap.ui.layout.form.SimpleForm

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 a ResponsiveGridLayout is used as a 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.

Parameters:
intiMaxContainerColsNew value for property maxContainerCols
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
setMinWidth(iMinWidth): sap.ui.layout.form.SimpleForm

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.

Parameters:
intiMinWidthNew value for property minWidth
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
setSingleContainerFullSize(bSingleContainerFullSize): sap.ui.layout.form.SimpleForm

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.

Parameters:
booleanbSingleContainerFullSizeNew value for property singleContainerFullSize
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.34.0
Sets the aggregated title.
Parameters:
sap.ui.core.Title|stringvTitleThe title to set
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.16.3
setToolbar(oToolbar): sap.ui.layout.form.SimpleForm
Sets the aggregated toolbar.
Parameters:
sap.ui.core.ToolbaroToolbarThe toolbar to set
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.36.0

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.

Parameters:
sap.ui.core.CSSSizesWidthNew value for property width
Returns:
sap.ui.layout.form.SimpleFormReference to this in order to allow method chaining
Since:
1.28.0