Class sap.ui.layout.form.GridElementDataModule: sap/ui/layout/form/GridElementData

extends LayoutData
known direct subclasses: GridElementData

The GridLayout-specific layout data for FormElement fields.


Since: 1.16.0.
Constructor Summary
new sap.ui.layout.form.GridElementData(sId?, mSettings?)Constructor for a new sap.ui.layout.form.GridElementData.
Method Summary
sap.ui.layout.form.GridElementData.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.layout.form.GridElementData with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.layout.form.GridElementData.getMetadata()Returns a metadata object for class sap.ui.layout.form.GridElementData.
getHCells()Gets current value of property hCells.
getVCells()Gets current value of property vCells.
setHCells(sHCells)Sets a new value for property hCells.
setVCells(iVCells)Sets a new value for property vCells.
Constructor Detail
new sap.ui.layout.form.GridElementData(sId?, mSettings?)
Constructor for a new sap.ui.layout.form.GridElementData.

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:

  • Properties
    • hCells : sap.ui.layout.form.GridElementCells (default: auto)
    • vCells : int (default: 1)

In addition, all settings applicable to the base type sap.ui.core.LayoutData 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.GridElementData.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.layout.form.GridElementData 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.LayoutData.extend.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.ui.layout.form.GridElementData.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.layout.form.GridElementData.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
Gets current value of property hCells.

Number of cells in horizontal direction. If set to "auto" the size is determined by the number of fields and the available cells. For labels the auto size is 3 cells. If set to "full" only one field is allowed within the FormElement. It gets the full width of the row and the label is displayed above. Note: For labels full size has no effect.

Default value is auto.

Returns:
{sap.ui.layout.form.GridElementCells} Value of property hCells
getVCells(): int
Gets current value of property vCells.

Number of cells in vertical direction. Note: This property has no effect for labels.

Default value is 1.

Returns:
{int} Value of property vCells
Sets a new value for property hCells.

Number of cells in horizontal direction. If set to "auto" the size is determined by the number of fields and the available cells. For labels the auto size is 3 cells. If set to "full" only one field is allowed within the FormElement. It gets the full width of the row and the label is displayed above. Note: For labels full size has no effect.

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

Default value is auto.

Parameters:
{sap.ui.layout.form.GridElementCells}sHCells New value for property hCells
Returns:
{sap.ui.layout.form.GridElementData} Reference to this in order to allow method chaining
Sets a new value for property vCells.

Number of cells in vertical direction. Note: This property has no effect for labels.

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

Default value is 1.

Parameters:
{int}iVCells New value for property vCells
Returns:
{sap.ui.layout.form.GridElementData} Reference to this in order to allow method chaining