class sap.ui.table.CreationRow

Control sample: sap.ui.table.CreationRow
Visiblity: restricted
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/table/CreationRow
Application Component: CA-UI5-TBL

Allows to enter data in a row shaped form, if placed inside a sap.ui.table.Table. The form elements (cells aggregation) are aligned with the columns of the table, and are created automatically based on the creationTemplate aggregation of the sap.ui.table.Column.

Note: This control is compatible only with the sap.m library. Do not use it together with the sap.ui.commons library.


Constructor

Constructor for a new CreationRow.

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.table.CreationRow(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


Properties

Name Type Default Value Description
applyEnabled boolean true

If set to false, the apply event is not fired. The corresponding keyboard shortcut and the apply button of the default toolbar are disabled.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
_defaultToolbar 0..1 sap.ui.core.Toolbar

The default toolbar.

cells 0..n sap.ui.core.Control

The actual cells are a table-internal construct. The controls in this aggregation are the content of the cells. This aggregation is managed by the table and must not be manipulated. Only read access is allowed.

toolbar 0..1 sap.ui.core.Toolbar

The toolbar that is placed below the form. If no toolbar is set, a default toolbar is created. Basic buttons and functionality are provided only in the default toolbar.


Events Overview

Event Description
apply

Fired when the corresponding keyboard shortcut or the apply button of the default toolbar are pressed.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

apply

Fired when the corresponding keyboard shortcut or the apply button of the default toolbar are pressed.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

Methods Overview

Method Description
addCell

Adds some cell to the aggregation cells.

attachApply

Attaches event handler fnFunction to the apply event of this sap.ui.table.CreationRow.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.table.CreationRow itself.

Fired when the corresponding keyboard shortcut or the apply button of the default toolbar are pressed.

destroyCells

Destroys all the cells in the aggregation cells.

destroyToolbar

Destroys the toolbar in the aggregation toolbar.

detachApply

Detaches event handler fnFunction from the apply event of this sap.ui.table.CreationRow.

The passed function and listener object must match the ones used for event registration.

sap.ui.table.CreationRow.extend

Creates a new subclass of class sap.ui.table.CreationRow 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.

fireApply

Fires event apply to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

getApplyEnabled

Gets current value of property applyEnabled.

If set to false, the apply event is not fired. The corresponding keyboard shortcut and the apply button of the default toolbar are disabled.

Default value is true.

getCells

Gets content of aggregation cells.

The actual cells are a table-internal construct. The controls in this aggregation are the content of the cells. This aggregation is managed by the table and must not be manipulated. Only read access is allowed.

sap.ui.table.CreationRow.getMetadata

Returns a metadata object for class sap.ui.table.CreationRow.

getToolbar

Gets content of aggregation toolbar.

The toolbar that is placed below the form. If no toolbar is set, a default toolbar is created. Basic buttons and functionality are provided only in the default toolbar.

indexOfCell

Checks for the provided sap.ui.core.Control in the aggregation cells. and returns its index if found or -1 otherwise.

insertCell

Inserts a cell into the aggregation cells.

removeAllCells

Removes all the controls from the aggregation cells.

Additionally, it unregisters them from the hosting UIArea.

removeCell

Removes a cell from the aggregation cells.

resetFocus

Sets the focus to the first editable form element.

setApplyEnabled

Sets a new value for property applyEnabled.

If set to false, the apply event is not fired. The corresponding keyboard shortcut and the apply button of the default toolbar are disabled.

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

Default value is true.

setToolbar

Sets the aggregated toolbar.

addCell

Adds some cell to the aggregation cells.

Param Type DefaultValue Description
oCell sap.ui.core.Control

The cell to add; if empty, nothing is inserted

attachApply

Attaches event handler fnFunction to the apply event of this sap.ui.table.CreationRow.

When called, the context of the event handler (its this) will be bound to oListener if specified, otherwise it will be bound to this sap.ui.table.CreationRow itself.

Fired when the corresponding keyboard shortcut or the apply button of the default toolbar are pressed.

Param Type DefaultValue Description
oData object

An application-specific payload object that will be passed to the event handler along with the event object when firing the event

fnFunction function(sap.ui.base.Event) : void

The function to be called when the event occurs

oListener object

Context object to call the event handler with. Defaults to this sap.ui.table.CreationRow itself

destroyCells

Destroys all the cells in the aggregation cells.

destroyToolbar

Destroys the toolbar in the aggregation toolbar.

detachApply

Detaches event handler fnFunction from the apply event of this sap.ui.table.CreationRow.

The passed function and listener object must match the ones used for event registration.

Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

sap.ui.table.CreationRow.extend

Creates a new subclass of class sap.ui.table.CreationRow 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

fireApply

Fires event apply to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

getApplyEnabled

Gets current value of property applyEnabled.

If set to false, the apply event is not fired. The corresponding keyboard shortcut and the apply button of the default toolbar are disabled.

Default value is true.

getCells

Gets content of aggregation cells.

The actual cells are a table-internal construct. The controls in this aggregation are the content of the cells. This aggregation is managed by the table and must not be manipulated. Only read access is allowed.

sap.ui.table.CreationRow.getMetadata

Returns a metadata object for class sap.ui.table.CreationRow.

getToolbar

Gets content of aggregation toolbar.

The toolbar that is placed below the form. If no toolbar is set, a default toolbar is created. Basic buttons and functionality are provided only in the default toolbar.

indexOfCell

Checks for the provided sap.ui.core.Control in the aggregation cells. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oCell sap.ui.core.Control

The cell whose index is looked for

insertCell

Inserts a cell into the aggregation cells.

Param Type DefaultValue Description
oCell sap.ui.core.Control

The cell to insert; if empty, nothing is inserted

iIndex int

The 0-based index the cell should be inserted at; for a negative value of iIndex, the cell is inserted at position 0; for a value greater than the current size of the aggregation, the cell is inserted at the last position

removeAllCells

Removes all the controls from the aggregation cells.

Additionally, it unregisters them from the hosting UIArea.

removeCell

Removes a cell from the aggregation cells.

Param Type DefaultValue Description
vCell int string sap.ui.core.Control

The cell to remove or its index or id

resetFocus

Sets the focus to the first editable form element.

setApplyEnabled

Sets a new value for property applyEnabled.

If set to false, the apply event is not fired. The corresponding keyboard shortcut and the apply button of the default toolbar are disabled.

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
bApplyEnabled boolean true

New value for property applyEnabled

setToolbar

Sets the aggregated toolbar.

Param Type DefaultValue Description
oToolbar sap.ui.core.Toolbar

The toolbar to set