class sap.ui.comp.smarttable.SmartTable

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Extends: sap.m.VBox
Module: sap/ui/comp/smarttable/SmartTable
Application Component: CA-UI5-TBL

The SmartTable control creates a table based on OData metadata and the configuration specified. The entitySet attribute must be specified to use the control. This attribute is used to fetch fields from OData metadata, from which columns will be generated; it can also be used to fetch the actual table data.
Based on the tableType property, this control will render a standard, analytical, tree, or responsive table.
Note:


Constructor

Constructor for a new smarttable/SmartTable.

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.comp.smarttable.SmartTable(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
currentVariantId string

Retrieves or sets the current variant.

Since: 1.28.0.

Visibility: public
demandPopin boolean false

The demandPopin attribute can be set to true or false depending on whether you want to display columns as popins on the responsive table

Since: 1.30.0.

Visibility: public
detailsButtonSetting sap.ui.core.Priority[]

Defines which columns should be hidden instead of moved into the pop-in area depending on their importance. See sap.m.Column#getImportance and sap.m.Table#getHiddenInPopin for more details.

Note: To hide columns based on their importance, it's mandatory to set showDetailsButton="true". If no priority is given, the default configuration of sap.ui.comp.smarttable.SmartTable#getShowDetailsButton is used. If this property is changed after the SmartTable has been initialized, the new changes take effect only when the Show / Hide Details button is pressed a second time.

Since: 1.86.

Visibility: public
editTogglable boolean false

Specifies whether the editable property can be toggled via a button on the toolbar. (The automatic toggle of controls works only for the SmartField/SmartToggle scenario)

Since: 1.28.0.

Visibility: public
editable boolean false

This attribute can be used to specify if the controls created by the SmartTable control are editable. (The automatic toggle of controls works only for the SmartField/SmartToggle scenario)

Since: 1.28.0.

Visibility: public
enableAutoBinding boolean false

When set to true, this enables automatic binding of the table using the tableBindingPath (if it exists) or entitySet property. This happens just after the initialise event has been fired.

Note:
This is not a dynamic property and cannot be changed once the control has been initialized.

Since: 1.28.0.

Visibility: public
enableAutoColumnWidth boolean false

Enables heuristic column width calculation for all supported table types based on metadata information when set to true. The column width calculation takes OData type, column label, text arrangement, possible cell templates, additional fields and many other metadata parameters into account. Providing more precise MaxLength value for the Edm.String type or precision value for numeric OData types can help this algorithm to produce better results. The calculated column widths can have a minimum of 3rem and a maximum of 20rem. To avoid the heuristic column width calculation for a particular column, the CssDefaults annotation can be used.

If tableType="ResponsiveTable", the following changes are applied:

  • demandPopin property of the SmartTable is set to true.
  • fixedLayout property of the inner table is set to Strict.
  • contextualWidth property of the inner table is set to Auto.
  • Column resizing feature gets enabled and the wrapping of column headers get disabled for all columns, including custom columns.
Those properties must not be managed by the application.

By default, this feature has no effect on custom columns. To enable heuristic column width calculation also for custom columns, the autoColumnWidth property must be specified in the p13nData custom data.
Note: The automatic column width calculation for custom columns works only when the width property of the custom column is not set.
Note: The custom columns can have unexpected cell templates that might affect the result of the column width calculation, for example, an Edm.Byte field that can only have three digits might be visualized as a sap.m.RatingIndicator that requires more space.
Note: Defining the leadingProperty and a unique columnKey in the p13nData custom data is a prerequisite for all other p13nData properties, including the autoColumnWidth property.
Examples with autoColumnWidth property of the p13nData custom data

<!-- Enable the automatic column width calculation for a custom column -->
<Column customdata:p13nData='\{"autoColumnWidth": true, "leadingProperty": "PropA", "columnKey": "PropA"}' >
<!-- Restrict the automatic width calculation to a minimum of 5rem and a maximum of 15rem -->
<Column customdata:p13nData='\{"autoColumnWidth": \{ "min": 5, "max": 15 }, "leadingProperty": "PropA", "columnKey": "PropA"}' >
<!-- Define extra 3rem space to the automatic content width calcuation -->
<Column customdata:p13nData='\{"autoColumnWidth": \{ "gap": 3 }, "leadingProperty": "PropA", "columnKey": "PropA"}' >
<!-- Define the visible fields that need to be calculated -->
<Column customdata:p13nData='\{"autoColumnWidth": \{ "visibleField": "PropC" }, "leadingProperty": "PropA", "additionalProperty": "PropB,PropC", "columnKey": "PropA"}' >

Note: The enableAutoColumnWidth is not a dynamic property and cannot be changed once the control has been initialized.

Since: 1.86.

Visibility: public
enableCustomFilter boolean true

Can be used to override the filter behavior. If set to true (default), instead of the filter input box a button is rendered. When pressing this button, the SmartTable control opens the filter panel directly in the table personalization dialog.

Since: 1.26.0.

Visibility: public
enablePaste boolean true

Determines whether the Paste button is enabled.

Since: 1.96.

Visibility: public
entitySet string

The entity set name from which to fetch data and generate the columns. Note that this is not a dynamic UI5 property.

Note: It is not allowed to have one of the following strings as field names for your OData entity:

  • btnEditToggle
  • btnExcelExport
  • btnFullScreen
  • btnPersonalisation
  • header
  • infoToolbarText
  • persoController
  • toolbarSeperator
  • toolbarSpacer
  • ui5table
  • variant

This is not a dynamic property and cannot be changed once the control has been initialized.

Since: 1.26.0.

Visibility: public
exportType sap.ui.comp.smarttable.ExportType UI5Client

Specifies the type of export to be used in the SmartTable control.

Since: 1.50.0.

Visibility: public
header string

Specifies header text that is shown in table

Since: 1.26.0.

Visibility: public
headerLevel sap.ui.core.TitleLevel Auto

Defines the semantic level of the header. For more information, see sap.m.Title#setLevel.

Since: 1.84.

Visibility: public
ignoreFromPersonalisation string

Comma-separated value of fields that is not shown in the personalization dialog.
This property must only be used for use cases where a technical field/column is required to fetch some data from the backend but is hidden in the table personalization and on the UI.

Note:

  • Please ensure that you do not add spaces or special characters as no validation is done for this property.
  • Visible fields/columns cannot be included in this property as this is not supported by the SmartTable control.
  • This is not a dynamic property and cannot be changed once the control has been initialized.


Since: 1.32.0.

Visibility: public
ignoredFields string

Comma-separated value of fields that must be ignored in the OData metadata by the SmartTable control.
The SmartTable control will not create built-in columns for the fields defined by this property and will not offer these fields in table personalization.

Note:

  • Please ensure that you do not add spaces or special characters as no validation is done for this property.
  • This is not a dynamic property and cannot be changed once the control has been initialized.


Since: 1.26.0.

Visibility: public
initialNoDataText string

The text shown initially before the control is bound and initialized. The special values $FILTERBAR or $NO_FILTERBAR can be specified to make the SmartTable control show the initial text as if the SmartFilterBar control were associated with it. If nothing is specified, the default behavior is to show the initial text based on whether the SmartFilterBar control is actually associated with the SmartTable control.

Since: 1.58.

Visibility: public
initiallyVisibleFields string

Comma-separated value of fields that must be shown initially in the SmartTable as visible columns and in the order specified.
This property is mainly meant to be used when no LineItem annotation exists.
If you have fields in the XMLView they are always shown first; then, the columns are added based on the LineItem annotation and finally based on this property.
Note:

  • If both this property and the LineItem annotation exist, the order of fields cannot be guaranteed to be as mentioned here.
  • Please ensure that you do not add spaces or special characters as no validation is done for this property.
  • This is not a dynamic property and cannot be changed once the control has been initialized.


Since: 1.32.0.

Visibility: public
persistencyKey string

Key used to access personalization data.

Note:
This is not a dynamic property and cannot be changed once the control has been initialized.

Since: 1.26.0.

Visibility: public
placeToolbarInTable boolean false

Specifies whether the Toolbar control of the SmartTable is placed inside the corresponding aggregation of the inner UI5 table control.

Since: 1.56.

Visibility: public
requestAtLeastFields string

Comma-separated value of fields that must be always requested from the backend
This property is mainly meant to be used when there is no PresentationVariant annotation.
If both this property and the PresentationVariant annotation exist, the select request sent to the backend would be a combination of both.
Note:
For AnalyticalTable (supported since 1.54), the following restrictions apply:

  • The property name(s) must not point to a new dimension or a measure.
  • The property name(s) must not point to a navigationProperty/association path, as this might not supported by analytical services.
Please ensure that you do not add spaces or special characters as no validation is done for this property.

Since: 1.32.0.

Visibility: public
showDetailsButton boolean false

Controls the visibility of the Show / Hide Details button for the ResponsiveTable scenario.

If the available screen space gets too narrow, the columns configured with High and Medium importance move to the pop-in area while the columns with Low importance are hidden. On mobile phones, the columns with Medium importance are also hidden. As soon as the first column is hidden, this button appears in the table toolbar and gives the user the possibility to toggle the visibility of the hidden columns in the pop-in area.

Note: This is not a dynamic property and cannot be changed once the control has been initialized.

Since: 1.79.

Visibility: public
showFullScreenButton boolean false

Controls the visibility of the FullScreen button.

Since: 1.38.

Visibility: public
showPasteButton boolean false

Controls the visibility of the Paste button.

Since: 1.91.

Visibility: public
showRowCount boolean true

The number of rows is shown along with the header text if the property showRowCount is set to true.

Note:

  • To improve your application's performance, activate the inline count for OData bindings to avoid sending dedicated OData requests.
  • If no stable overall count can be retrieved from the binding, the count will not be displayed. This is currently the case for TreeBinding or if no count is requested by the binding.


Since: 1.26.0.

Visibility: public
showTablePersonalisation boolean true

The showTablePersonalisation attribute can be set to true or false for controlling the visibility of the TablePersonalisation button.

Since: 1.38.0.

Visibility: public
showVariantManagement boolean true

The showVariantManagement attribute can be set to true or false for controlling the visibility of VariantManagement button.

Since: 1.38.0.

Visibility: public
smartFilterId string

ID of the corresponding SmartFilter control; When specified, the SmartTable searches for the SmartFilter (also in the closest parent View) and attaches to the relevant events of the SmartFilter; to fetch data, show overlay etc.

Note:
This is not a dynamic property and cannot be changed once the control has been initialized.

Since: 1.26.0.

Visibility: public
tableBindingPath string

This attribute can be used to specify the path that is used during the binding of the table. If not specified, the entitySet attribute is used instead. (used only if binding is established after setting this property: initially due to enableAutoBinding -or- by subsequently calling rebindTable)

Since: 1.28.0.

Visibility: public
tableType sap.ui.comp.smarttable.TableType

Specifies the type of table to be created in the SmartTable control.
Note:

  • If you add a table to the content of the SmartTable in the view, this property has no effect.
  • This is not a dynamic property and cannot be changed once the control has been initialized.


Since: 1.26.0.

Visibility: public
toolbarStyleClass string

A style class which is defined for the toolbar of the table.

Since: 1.26.0.

Visibility: public
useExportToExcel boolean true

Can be set to true or false depending on whether you want to export data to a spreadsheet application, for example Microsoft Excel.
Note:
If exportType is sap.ui.comp.smarttable.ExportType.GW, any $expand parameters are removed when sending the request to generate the spreadsheet.
As of UI5 version 1.56: If exportType is sap.ui.comp.smarttable.ExportType.UI5Client and TreeTable is used, the worksheet.hierarchyLevel property (see sap.ui.export.Spreadsheet) is filled from the binding, if the relevant information is available there for exporting hierarchical data in the spreadsheet.

Since: 1.26.0.

Visibility: public
useInfoToolbar sap.ui.comp.smarttable.InfoToolbarBehavior Auto

Shows an info toolbar.
Filters that are applied using the table personalization dialog are shown in the info toolbar.
Note:

  • The default value for the property is Auto, which means that the info toolbar is shown by default if table type is ResponsiveTable.
  • The info toolbar is hidden if the property is set to Off.
  • The info toolbar is visible if the property is set to On. Currently the info toolbar is only available for the table type ResponsiveTable.
  • If multiple filters are applied to the same column, then the info toolbar contains the column name only once.
  • In case there is a custom info toolbar used for the responsive table control, then the property must be set to Off. Otherwise, an error is logged in the browser console.


Since: 1.70.

Visibility: public
useOnlyOneSolidToolbar boolean false

If set to true, the standard toolbar and custom toolbar will be merged into one toolbar. The combined toolbar will have a solid style.

Since: 1.26.0.

Visibility: public
useTablePersonalisation boolean true

The useTablePersonalisation attribute can be set to true or false depending on whether you want to define personalized table settings. If you want to persist the table personalization, you need to specify the persistencyKey property.

Note:
This is not a dynamic property and cannot be changed once the control has been initialized.

Since: 1.26.0.

Visibility: public
useVariantManagement boolean true

The useVariantManagement attribute can be set to true or false depending on whether you want to use variants. As a prerequisite you need to specify the persistencyKey property.

Since: 1.26.0.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
customToolbar 0..1 sap.m.Toolbar

A toolbar that can be added by the user to define their own custom buttons, icons, etc. If this is specified, the SmartTable control does not create an additional toolbar, but makes use of this one.
Note:
The CSS class sapMTBHeader-CTX is applied on the given toolbar.

Since: 1.26.0.

dataStateIndicator 0..1 sap.m.plugins.DataStateIndicator

Defines an aggregation for the DataStateIndicator plugin that can be used to show binding-related messages. If the enableFiltering property of the DataStateIndicator is set to true, the SmartTable control prevents the original behavior of the DataStateIndicator and manages the filtering of binding-related messages. If a user applies or clears message filters, the SmartTable control fires the beforeRebindTable event with the messageFilterActive parameter that is used to determine whether message filtering is active or not. After the binding-related messages have been filtered by the user, all the existing filters, for example, those defined using SmartFilterBar are only taken into account once the message filter has been cleared again. Therefore the message filtering should not be used in combination with a SmartFilterBar. Required additional filters must be added by applications in the beforeRebindTable event.

Since: 1.89.

noData 0..1 sap.ui.core.Control

The value for the noData aggregation can be either a string value or a control instance.
The control is shown, in case there is no data for the Table available. In case of a string value this will simply replace the no data text.
Currently the Responsive Table only supports string values.

Since: 1.32.0.

semanticKeyAdditionalControl 0..1 sap.ui.core.Control

Allows users to specify an additional control that will be added to a VBox for the first semantic key field.
Note:
This property is not meant for public use.

Since: 1.38.0.

semanticObjectController 0..1 sap.ui.comp.navpopover.SemanticObjectController

The Semantic Object Controller allows the user to specify and overwrite functionality for semantic object navigation.

Since: 1.28.0.


Associations

Name Cardinality Type Description
smartVariant 0..1 sap.ui.core.Control

Identifies the SmartVariant control which should be used for the personalization. Will be ignored if the advanced mode is set.

Since: 1.38.


Events Overview

Event Description
afterVariantApply

This event is fired after a variant has been applied.

Since: 1.28.0.

afterVariantInitialise

This event is fired after variant management in the SmartTable has been initialized.

Since: 1.28.0.

afterVariantSave

This event is fired after a variant has been saved. This event can be used to retrieve the ID of the saved variant.

Since: 1.28.0.

beforeExport

This event is fired just before export is triggered.

Since: 1.50.

beforePaste

This event is fired just before the paste event is triggered and can be used to prevent the default paste behavior.

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

beforeRebindTable

This event is fired just before the binding is being done.

Since: 1.26.0.

dataReceived

This event is fired when data is received after binding. The event is fired if the binding for the table is done by the SmartTable itself.

Since: 1.28.0.

dataRequested

This event is fired when data is requested after binding. The event is fired if the binding for the table is done by the SmartTable itself.

Since: 1.52.0.

editToggled

This event is fired when display/edit button is clicked.

Since: 1.28.0.

fieldChange

This event is fired when an editable field, created internally by the SmartTable control, is changed.

Since: 1.34.0.

fullScreenToggled

This event is fired right after the full screen mode of the SmartTable control has been changed.

Since: 1.46.

initialise

This event is fired once the control has been initialized.

Since: 1.26.0.

paste

This event is fired when paste is triggered.

showOverlay

This event is fired just before the overlay is being shown.

Since: 1.32.0.

afterVariantApply

This event is fired after a variant has been applied.

Since: 1.28.0.

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

ID of the currently selected variant

afterVariantInitialise

This event is fired after variant management in the SmartTable has been initialized.

Since: 1.28.0.

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

afterVariantSave

This event is fired after a variant has been saved. This event can be used to retrieve the ID of the saved variant.

Since: 1.28.0.

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

ID of the currently selected variant

beforeExport

This event is fired just before export is triggered.

Since: 1.50.

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

Contains workbook.columns, dataSource and other export-related information

userExportSettings object

Contains the export settings defined by the user

beforePaste

This event is fired just before the paste event is triggered and can be used to prevent the default paste behavior.

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
columnInfos object[]

Contains array of column info object as determined by the SmartTable

beforeRebindTable

This event is fired just before the binding is being done.

Since: 1.26.0.

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

Indicates whether the message filtering is active or not

bindingParams object

The bindingParams object contains filters, sorters and other binding related information for the table.

preventTableBind boolean

If set to true by the listener, binding is prevented

filters sap.ui.model.Filter[]

The combined filter array containing a set of sap.ui.model.Filter instances of the SmartTable and SmartFilter controls; can be modified by users to influence filtering

sorter sap.ui.model.Sorter[]

An array containing a set of sap.ui.model.Sorter instances of the SmartTable control (personalization); can be modified by users to influence sorting

parameters object

a map of parameters which is passed to the binding

events object

map of event listeners for the binding events (since 1.56). The events listeners can only be registered while the binding is created. So, ensure that the events parameter is filled from the beginning, so that the registration can be done while the binding is created.

dataReceived

This event is fired when data is received after binding. The event is fired if the binding for the table is done by the SmartTable itself.

Since: 1.28.0.

Use <code>beforeRebindTable</code> event to attach/listen to the binding "events" directly
Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

dataRequested

This event is fired when data is requested after binding. The event is fired if the binding for the table is done by the SmartTable itself.

Since: 1.52.0.

Use <code>beforeRebindTable</code> event to attach/listen to the binding "events" directly
Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

editToggled

This event is fired when display/edit button is clicked.

Since: 1.28.0.

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

fieldChange

This event is fired when an editable field, created internally by the SmartTable control, is changed.

Since: 1.34.0.

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

fullScreenToggled

This event is fired right after the full screen mode of the SmartTable control has been changed.

Since: 1.46.

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

If true, control is in full screen mode

initialise

This event is fired once the control has been initialized.

Since: 1.26.0.

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

paste

This event is fired when paste is triggered.

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

Contains parsed/validated paste information returned by PasteHelper.parse API

showOverlay

This event is fired just before the overlay is being shown.

Since: 1.32.0.

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

The overlay object contains information related to the table's overlay

show boolean

If set to false by the listener, overlay is not shown


Methods Overview

Method Description
applyVariant

Interface function for SmartVariantManagement control, sets the current variant. Note: If an application default variant exists, then all other variants are extended from this application default variant.

attachAfterVariantApply

Attaches event handler fnFunction to the afterVariantApply event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired after a variant has been applied.

attachAfterVariantInitialise

Attaches event handler fnFunction to the afterVariantInitialise event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired after variant management in the SmartTable has been initialized.

attachAfterVariantSave

Attaches event handler fnFunction to the afterVariantSave event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired after a variant has been saved. This event can be used to retrieve the ID of the saved variant.

attachBeforeExport

Attaches event handler fnFunction to the beforeExport event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired just before export is triggered.

attachBeforePaste

Attaches event handler fnFunction to the beforePaste event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired just before the paste event is triggered and can be used to prevent the default paste behavior.

attachBeforeRebindTable

Attaches event handler fnFunction to the beforeRebindTable event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired just before the binding is being done.

attachDataReceived

Attaches event handler fnFunction to the dataReceived event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired when data is received after binding. The event is fired if the binding for the table is done by the SmartTable itself.

Since 1.56 Use <code>beforeRebindTable</code> event to attach/listen to the binding "events" directly
attachDataRequested

Attaches event handler fnFunction to the dataRequested event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired when data is requested after binding. The event is fired if the binding for the table is done by the SmartTable itself.

Since 1.56 Use <code>beforeRebindTable</code> event to attach/listen to the binding "events" directly
attachEditToggled

Attaches event handler fnFunction to the editToggled event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired when display/edit button is clicked.

attachFieldChange

Attaches event handler fnFunction to the fieldChange event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired when an editable field, created internally by the SmartTable control, is changed.

attachFullScreenToggled

Attaches event handler fnFunction to the fullScreenToggled event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired right after the full screen mode of the SmartTable control has been changed.

attachInitialise

Attaches event handler fnFunction to the initialise event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired once the control has been initialized.

attachPaste

Attaches event handler fnFunction to the paste event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired when paste is triggered.

attachShowOverlay

Attaches event handler fnFunction to the showOverlay event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired just before the overlay is being shown.

deactivateColumns

Deactivates existing columns in the personalization dialog based on the provided column keys.
Note: The columns are set to invisible and excluded from all panels in the table personalization. Any existing sorting, filtering or grouping in the personalization dialog for such columns will no longer be taken into account.

destroyCustomToolbar

Destroys the customToolbar in the aggregation customToolbar.

destroyDataStateIndicator

Destroys the dataStateIndicator in the aggregation dataStateIndicator.

destroyNoData

Destroys the noData in the aggregation noData.

destroySemanticKeyAdditionalControl

Destroys the semanticKeyAdditionalControl in the aggregation semanticKeyAdditionalControl.

destroySemanticObjectController

Destroys the semanticObjectController in the aggregation semanticObjectController.

detachAfterVariantApply

Detaches event handler fnFunction from the afterVariantApply event of this sap.ui.comp.smarttable.SmartTable.

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

detachAfterVariantInitialise

Detaches event handler fnFunction from the afterVariantInitialise event of this sap.ui.comp.smarttable.SmartTable.

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

detachAfterVariantSave

Detaches event handler fnFunction from the afterVariantSave event of this sap.ui.comp.smarttable.SmartTable.

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

detachBeforeExport

Detaches event handler fnFunction from the beforeExport event of this sap.ui.comp.smarttable.SmartTable.

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

detachBeforePaste

Detaches event handler fnFunction from the beforePaste event of this sap.ui.comp.smarttable.SmartTable.

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

detachBeforeRebindTable

Detaches event handler fnFunction from the beforeRebindTable event of this sap.ui.comp.smarttable.SmartTable.

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

detachDataReceived

Detaches event handler fnFunction from the dataReceived event of this sap.ui.comp.smarttable.SmartTable.

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

Since 1.56 Use <code>beforeRebindTable</code> event to attach/listen to the binding "events" directly
detachDataRequested

Detaches event handler fnFunction from the dataRequested event of this sap.ui.comp.smarttable.SmartTable.

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

Since 1.56 Use <code>beforeRebindTable</code> event to attach/listen to the binding "events" directly
detachEditToggled

Detaches event handler fnFunction from the editToggled event of this sap.ui.comp.smarttable.SmartTable.

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

detachFieldChange

Detaches event handler fnFunction from the fieldChange event of this sap.ui.comp.smarttable.SmartTable.

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

detachFullScreenToggled

Detaches event handler fnFunction from the fullScreenToggled event of this sap.ui.comp.smarttable.SmartTable.

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

detachInitialise

Detaches event handler fnFunction from the initialise event of this sap.ui.comp.smarttable.SmartTable.

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

detachPaste

Detaches event handler fnFunction from the paste event of this sap.ui.comp.smarttable.SmartTable.

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

detachShowOverlay

Detaches event handler fnFunction from the showOverlay event of this sap.ui.comp.smarttable.SmartTable.

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

exit

Cleans up the control

sap.ui.comp.smarttable.SmartTable.extend

Creates a new subclass of class sap.ui.comp.smarttable.SmartTable with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.m.VBox.extend.

fetchVariant

Interface function for SmartVariantManagement control, returns the current used variant data

fireAfterVariantApply

Fires event afterVariantApply to attached listeners.

fireAfterVariantInitialise

Fires event afterVariantInitialise to attached listeners.

fireAfterVariantSave

Fires event afterVariantSave to attached listeners.

fireBeforeExport

Fires event beforeExport to attached listeners.

fireBeforePaste

Fires event beforePaste 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.

fireBeforeRebindTable

Fires event beforeRebindTable to attached listeners.

fireDataReceived

Fires event dataReceived to attached listeners.

Since 1.56 Use <code>beforeRebindTable</code> event to attach/listen to the binding "events" directly
fireDataRequested

Fires event dataRequested to attached listeners.

Since 1.56 Use <code>beforeRebindTable</code> event to attach/listen to the binding "events" directly
fireEditToggled

Fires event editToggled to attached listeners.

fireFieldChange

Fires event fieldChange to attached listeners.

fireFullScreenToggled

Fires event fullScreenToggled to attached listeners.

fireInitialise

Fires event initialise to attached listeners.

firePaste

Fires event paste to attached listeners.

fireShowOverlay

Fires event showOverlay to attached listeners.

getCurrentVariantId

returns the id of the currently selected variant.

getCustomToolbar

Gets content of aggregation customToolbar.

A toolbar that can be added by the user to define their own custom buttons, icons, etc. If this is specified, the SmartTable control does not create an additional toolbar, but makes use of this one.
Note:
The CSS class sapMTBHeader-CTX is applied on the given toolbar.

getDataStateIndicator

Gets content of aggregation dataStateIndicator.

Defines an aggregation for the DataStateIndicator plugin that can be used to show binding-related messages. If the enableFiltering property of the DataStateIndicator is set to true, the SmartTable control prevents the original behavior of the DataStateIndicator and manages the filtering of binding-related messages. If a user applies or clears message filters, the SmartTable control fires the beforeRebindTable event with the messageFilterActive parameter that is used to determine whether message filtering is active or not. After the binding-related messages have been filtered by the user, all the existing filters, for example, those defined using SmartFilterBar are only taken into account once the message filter has been cleared again. Therefore the message filtering should not be used in combination with a SmartFilterBar. Required additional filters must be added by applications in the beforeRebindTable event.

getDemandPopin

Gets current value of property demandPopin.

The demandPopin attribute can be set to true or false depending on whether you want to display columns as popins on the responsive table

Default value is false.

getDetailsButtonSetting

Gets current value of property detailsButtonSetting.

Defines which columns should be hidden instead of moved into the pop-in area depending on their importance. See sap.m.Column#getImportance and sap.m.Table#getHiddenInPopin for more details.

Note: To hide columns based on their importance, it's mandatory to set showDetailsButton="true". If no priority is given, the default configuration of sap.ui.comp.smarttable.SmartTable#getShowDetailsButton is used. If this property is changed after the SmartTable has been initialized, the new changes take effect only when the Show / Hide Details button is pressed a second time.

getEditable

Gets current value of property editable.

This attribute can be used to specify if the controls created by the SmartTable control are editable. (The automatic toggle of controls works only for the SmartField/SmartToggle scenario)

Default value is false.

getEditTogglable

Gets current value of property editTogglable.

Specifies whether the editable property can be toggled via a button on the toolbar. (The automatic toggle of controls works only for the SmartField/SmartToggle scenario)

Default value is false.

getEnableAutoBinding

Gets current value of property enableAutoBinding.

When set to true, this enables automatic binding of the table using the tableBindingPath (if it exists) or entitySet property. This happens just after the initialise event has been fired.

Note:
This is not a dynamic property and cannot be changed once the control has been initialized.

Default value is false.

getEnableAutoColumnWidth

Gets current value of property enableAutoColumnWidth.

Enables heuristic column width calculation for all supported table types based on metadata information when set to true. The column width calculation takes OData type, column label, text arrangement, possible cell templates, additional fields and many other metadata parameters into account. Providing more precise MaxLength value for the Edm.String type or precision value for numeric OData types can help this algorithm to produce better results. The calculated column widths can have a minimum of 3rem and a maximum of 20rem. To avoid the heuristic column width calculation for a particular column, the CssDefaults annotation can be used.

If tableType="ResponsiveTable", the following changes are applied:

  • demandPopin property of the SmartTable is set to true.
  • fixedLayout property of the inner table is set to Strict.
  • contextualWidth property of the inner table is set to Auto.
  • Column resizing feature gets enabled and the wrapping of column headers get disabled for all columns, including custom columns.
Those properties must not be managed by the application.

By default, this feature has no effect on custom columns. To enable heuristic column width calculation also for custom columns, the autoColumnWidth property must be specified in the p13nData custom data.
Note: The automatic column width calculation for custom columns works only when the width property of the custom column is not set.
Note: The custom columns can have unexpected cell templates that might affect the result of the column width calculation, for example, an Edm.Byte field that can only have three digits might be visualized as a sap.m.RatingIndicator that requires more space.
Note: Defining the leadingProperty and a unique columnKey in the p13nData custom data is a prerequisite for all other p13nData properties, including the autoColumnWidth property.
Examples with autoColumnWidth property of the p13nData custom data

<!-- Enable the automatic column width calculation for a custom column -->
<Column customdata:p13nData='\{"autoColumnWidth": true, "leadingProperty": "PropA", "columnKey": "PropA"}' >
<!-- Restrict the automatic width calculation to a minimum of 5rem and a maximum of 15rem -->
<Column customdata:p13nData='\{"autoColumnWidth": \{ "min": 5, "max": 15 }, "leadingProperty": "PropA", "columnKey": "PropA"}' >
<!-- Define extra 3rem space to the automatic content width calcuation -->
<Column customdata:p13nData='\{"autoColumnWidth": \{ "gap": 3 }, "leadingProperty": "PropA", "columnKey": "PropA"}' >
<!-- Define the visible fields that need to be calculated -->
<Column customdata:p13nData='\{"autoColumnWidth": \{ "visibleField": "PropC" }, "leadingProperty": "PropA", "additionalProperty": "PropB,PropC", "columnKey": "PropA"}' >

Note: The enableAutoColumnWidth is not a dynamic property and cannot be changed once the control has been initialized.

Default value is false.

getEnableCustomFilter

Gets current value of property enableCustomFilter.

Can be used to override the filter behavior. If set to true (default), instead of the filter input box a button is rendered. When pressing this button, the SmartTable control opens the filter panel directly in the table personalization dialog.

Default value is true.

Since 1.40.0 After personalization dialog has been introduced in SmartTable the property <code>enableCustomFilter</code> does not make sense. When setting the property to <code>false</code>, the entered custom filter value will not be shown in personalization dialog and will also not be persisted in variant management. The custom filter will also be overwritten when rebindTable is called on the SmartTable.
getEnablePaste

Gets current value of property enablePaste.

Determines whether the Paste button is enabled.

Default value is true.

getEntitySet

Gets current value of property entitySet.

The entity set name from which to fetch data and generate the columns. Note that this is not a dynamic UI5 property.

Note: It is not allowed to have one of the following strings as field names for your OData entity:

  • btnEditToggle
  • btnExcelExport
  • btnFullScreen
  • btnPersonalisation
  • header
  • infoToolbarText
  • persoController
  • toolbarSeperator
  • toolbarSpacer
  • ui5table
  • variant

This is not a dynamic property and cannot be changed once the control has been initialized.

getExportType

Gets current value of property exportType.

Specifies the type of export to be used in the SmartTable control.

Default value is "UI5Client".

getHeader

Gets current value of property header.

Specifies header text that is shown in table

getHeaderLevel

Gets current value of property headerLevel.

Defines the semantic level of the header. For more information, see sap.m.Title#setLevel.

Default value is Auto.

getIgnoredFields

Gets current value of property ignoredFields.

Comma-separated value of fields that must be ignored in the OData metadata by the SmartTable control.
The SmartTable control will not create built-in columns for the fields defined by this property and will not offer these fields in table personalization.

Note:

  • Please ensure that you do not add spaces or special characters as no validation is done for this property.
  • This is not a dynamic property and cannot be changed once the control has been initialized.

getIgnoreFromPersonalisation

Gets current value of property ignoreFromPersonalisation.

Comma-separated value of fields that is not shown in the personalization dialog.
This property must only be used for use cases where a technical field/column is required to fetch some data from the backend but is hidden in the table personalization and on the UI.

Note:

  • Please ensure that you do not add spaces or special characters as no validation is done for this property.
  • Visible fields/columns cannot be included in this property as this is not supported by the SmartTable control.
  • This is not a dynamic property and cannot be changed once the control has been initialized.

getInitiallyVisibleFields

Gets current value of property initiallyVisibleFields.

Comma-separated value of fields that must be shown initially in the SmartTable as visible columns and in the order specified.
This property is mainly meant to be used when no LineItem annotation exists.
If you have fields in the XMLView they are always shown first; then, the columns are added based on the LineItem annotation and finally based on this property.
Note:

  • If both this property and the LineItem annotation exist, the order of fields cannot be guaranteed to be as mentioned here.
  • Please ensure that you do not add spaces or special characters as no validation is done for this property.
  • This is not a dynamic property and cannot be changed once the control has been initialized.

getInitialNoDataText

Gets current value of property initialNoDataText.

The text shown initially before the control is bound and initialized. The special values $FILTERBAR or $NO_FILTERBAR can be specified to make the SmartTable control show the initial text as if the SmartFilterBar control were associated with it. If nothing is specified, the default behavior is to show the initial text based on whether the SmartFilterBar control is actually associated with the SmartTable control.

sap.ui.comp.smarttable.SmartTable.getMetadata

Returns a metadata object for class sap.ui.comp.smarttable.SmartTable.

getNoData

Gets content of aggregation noData.

The value for the noData aggregation can be either a string value or a control instance.
The control is shown, in case there is no data for the Table available. In case of a string value this will simply replace the no data text.
Currently the Responsive Table only supports string values.

getPersistencyKey

Gets current value of property persistencyKey.

Key used to access personalization data.

Note:
This is not a dynamic property and cannot be changed once the control has been initialized.

getPlaceToolbarInTable

Gets current value of property placeToolbarInTable.

Specifies whether the Toolbar control of the SmartTable is placed inside the corresponding aggregation of the inner UI5 table control.

Default value is false.

getRequestAtLeastFields

Gets current value of property requestAtLeastFields.

Comma-separated value of fields that must be always requested from the backend
This property is mainly meant to be used when there is no PresentationVariant annotation.
If both this property and the PresentationVariant annotation exist, the select request sent to the backend would be a combination of both.
Note:
For AnalyticalTable (supported since 1.54), the following restrictions apply:

  • The property name(s) must not point to a new dimension or a measure.
  • The property name(s) must not point to a navigationProperty/association path, as this might not supported by analytical services.
Please ensure that you do not add spaces or special characters as no validation is done for this property.

getSemanticKeyAdditionalControl

Gets content of aggregation semanticKeyAdditionalControl.

Allows users to specify an additional control that will be added to a VBox for the first semantic key field.
Note:
This property is not meant for public use.

getSemanticObjectController

Gets content of aggregation semanticObjectController.

The Semantic Object Controller allows the user to specify and overwrite functionality for semantic object navigation.

getShowDetailsButton

Gets current value of property showDetailsButton.

Controls the visibility of the Show / Hide Details button for the ResponsiveTable scenario.

If the available screen space gets too narrow, the columns configured with High and Medium importance move to the pop-in area while the columns with Low importance are hidden. On mobile phones, the columns with Medium importance are also hidden. As soon as the first column is hidden, this button appears in the table toolbar and gives the user the possibility to toggle the visibility of the hidden columns in the pop-in area.

Note: This is not a dynamic property and cannot be changed once the control has been initialized.

Default value is false.

getShowFullScreenButton

Gets current value of property showFullScreenButton.

Controls the visibility of the FullScreen button.

Default value is false.

getShowPasteButton

Gets current value of property showPasteButton.

Controls the visibility of the Paste button.

Default value is false.

getShowRowCount

Gets current value of property showRowCount.

The number of rows is shown along with the header text if the property showRowCount is set to true.

Note:

  • To improve your application's performance, activate the inline count for OData bindings to avoid sending dedicated OData requests.
  • If no stable overall count can be retrieved from the binding, the count will not be displayed. This is currently the case for TreeBinding or if no count is requested by the binding.

Default value is true.

getShowTablePersonalisation

Gets current value of property showTablePersonalisation.

The showTablePersonalisation attribute can be set to true or false for controlling the visibility of the TablePersonalisation button.

Default value is true.

getShowVariantManagement

Gets current value of property showVariantManagement.

The showVariantManagement attribute can be set to true or false for controlling the visibility of VariantManagement button.

Default value is true.

getSmartFilterId

Gets current value of property smartFilterId.

ID of the corresponding SmartFilter control; When specified, the SmartTable searches for the SmartFilter (also in the closest parent View) and attaches to the relevant events of the SmartFilter; to fetch data, show overlay etc.

Note:
This is not a dynamic property and cannot be changed once the control has been initialized.

getSmartVariant

ID of the element which is the current target of the association smartVariant, or null.

getTable

returns the internally used table object

getTableBindingPath

Gets current value of property tableBindingPath.

This attribute can be used to specify the path that is used during the binding of the table. If not specified, the entitySet attribute is used instead. (used only if binding is established after setting this property: initially due to enableAutoBinding -or- by subsequently calling rebindTable)

getTableType

Gets current value of property tableType.

Specifies the type of table to be created in the SmartTable control.
Note:

  • If you add a table to the content of the SmartTable in the view, this property has no effect.
  • This is not a dynamic property and cannot be changed once the control has been initialized.

getToolbar

Returns the Toolbar instance used inside the SmartTable control.

getToolbarStyleClass

Gets current value of property toolbarStyleClass.

A style class which is defined for the toolbar of the table.

getUiState

Returns the current UI state of the SmartTable control.
Note:
The following restrictions apply:

  • Visualizations can only be used to modify the visibility and order of columns, the template or importance of the column cannot be changed
  • MaxItems is not supported
  • RequestAtLeast contains values that are combined from both the SmartTable control property and PresentationVariant annotation, but when it is updated it only affects the internal array. The property in the SmartTable stays the same as before
  • Changes to RequestAtLeast alone will not lead to a new data request
  • RequestAtLeast is not supported in AnalyticalTable scenario
  • Any other restrictions, like the ones mentioned in sap.ui.comp.state.UIState, also apply

getUseExportToExcel

Gets current value of property useExportToExcel.

Can be set to true or false depending on whether you want to export data to a spreadsheet application, for example Microsoft Excel.
Note:
If exportType is sap.ui.comp.smarttable.ExportType.GW, any $expand parameters are removed when sending the request to generate the spreadsheet.
As of UI5 version 1.56: If exportType is sap.ui.comp.smarttable.ExportType.UI5Client and TreeTable is used, the worksheet.hierarchyLevel property (see sap.ui.export.Spreadsheet) is filled from the binding, if the relevant information is available there for exporting hierarchical data in the spreadsheet.

Default value is true.

getUseInfoToolbar

Gets current value of property useInfoToolbar.

Shows an info toolbar.
Filters that are applied using the table personalization dialog are shown in the info toolbar.
Note:

  • The default value for the property is Auto, which means that the info toolbar is shown by default if table type is ResponsiveTable.
  • The info toolbar is hidden if the property is set to Off.
  • The info toolbar is visible if the property is set to On. Currently the info toolbar is only available for the table type ResponsiveTable.
  • If multiple filters are applied to the same column, then the info toolbar contains the column name only once.
  • In case there is a custom info toolbar used for the responsive table control, then the property must be set to Off. Otherwise, an error is logged in the browser console.

Default value is Auto.

getUseOnlyOneSolidToolbar

Gets current value of property useOnlyOneSolidToolbar.

If set to true, the standard toolbar and custom toolbar will be merged into one toolbar. The combined toolbar will have a solid style.

Default value is false.

Since 1.29 This property has no effect
getUseTablePersonalisation

Gets current value of property useTablePersonalisation.

The useTablePersonalisation attribute can be set to true or false depending on whether you want to define personalized table settings. If you want to persist the table personalization, you need to specify the persistencyKey property.

Note:
This is not a dynamic property and cannot be changed once the control has been initialized.

Default value is true.

getUseVariantManagement

Gets current value of property useVariantManagement.

The useVariantManagement attribute can be set to true or false depending on whether you want to use variants. As a prerequisite you need to specify the persistencyKey property.

Default value is true.

getVariantManagement

Returns the associated SmartVariantManagement control.

isInitialised

Checks whether the control is initialised

openDialogForKeyUser

Opens the View Settings Dialog for the UI adaptation.
Note: This function must only be used internally during the UI adaptation.

openPersonalisationDialog

Opens the desired panel of the personalization dialog.
Note: Calling this for panels that are globally hidden (E.g. manually by the application, or due to unavailability of functionality) leads to an empty dialog being shown.

rebindTable

This can be used to trigger binding on the table used in the SmartTable

setCurrentVariantId

Set the current variant according to the sVariantId. In case an empty string or null or undefined was passed the STANDARD will be set. STANDARD will also be set, in case the passed sVariantId could not be found. In case neither a flexibility variant, nor the content for the standard variant could not be obtained, nor the personalisable control obtained nothing will be executed/changed

setCustomToolbar

Sets the aggregated customToolbar.

setDataStateIndicator

Sets the aggregated dataStateIndicator.

setDemandPopin

Sets a new value for property demandPopin.

The demandPopin attribute can be set to true or false depending on whether you want to display columns as popins on the responsive table

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

Default value is false.

setDetailsButtonSetting

Sets a new value for property detailsButtonSetting.

Defines which columns should be hidden instead of moved into the pop-in area depending on their importance. See sap.m.Column#getImportance and sap.m.Table#getHiddenInPopin for more details.

Note: To hide columns based on their importance, it's mandatory to set showDetailsButton="true". If no priority is given, the default configuration of sap.ui.comp.smarttable.SmartTable#getShowDetailsButton is used. If this property is changed after the SmartTable has been initialized, the new changes take effect only when the Show / Hide Details button is pressed a second time.

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

setEditable

Sets a new value for property editable.

This attribute can be used to specify if the controls created by the SmartTable control are editable. (The automatic toggle of controls works only for the SmartField/SmartToggle scenario)

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

Default value is false.

setEditTogglable

Sets a new value for property editTogglable.

Specifies whether the editable property can be toggled via a button on the toolbar. (The automatic toggle of controls works only for the SmartField/SmartToggle scenario)

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

Default value is false.

setEnableAutoBinding

Sets a new value for property enableAutoBinding.

When set to true, this enables automatic binding of the table using the tableBindingPath (if it exists) or entitySet property. This happens just after the initialise event has been fired.

Note:
This is not a dynamic property and cannot be changed once the control has been initialized.

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

Default value is false.

setEnableAutoColumnWidth

Sets a new value for property enableAutoColumnWidth.

Enables heuristic column width calculation for all supported table types based on metadata information when set to true. The column width calculation takes OData type, column label, text arrangement, possible cell templates, additional fields and many other metadata parameters into account. Providing more precise MaxLength value for the Edm.String type or precision value for numeric OData types can help this algorithm to produce better results. The calculated column widths can have a minimum of 3rem and a maximum of 20rem. To avoid the heuristic column width calculation for a particular column, the CssDefaults annotation can be used.

If tableType="ResponsiveTable", the following changes are applied:

  • demandPopin property of the SmartTable is set to true.
  • fixedLayout property of the inner table is set to Strict.
  • contextualWidth property of the inner table is set to Auto.
  • Column resizing feature gets enabled and the wrapping of column headers get disabled for all columns, including custom columns.
Those properties must not be managed by the application.

By default, this feature has no effect on custom columns. To enable heuristic column width calculation also for custom columns, the autoColumnWidth property must be specified in the p13nData custom data.
Note: The automatic column width calculation for custom columns works only when the width property of the custom column is not set.
Note: The custom columns can have unexpected cell templates that might affect the result of the column width calculation, for example, an Edm.Byte field that can only have three digits might be visualized as a sap.m.RatingIndicator that requires more space.
Note: Defining the leadingProperty and a unique columnKey in the p13nData custom data is a prerequisite for all other p13nData properties, including the autoColumnWidth property.
Examples with autoColumnWidth property of the p13nData custom data

<!-- Enable the automatic column width calculation for a custom column -->
<Column customdata:p13nData='\{"autoColumnWidth": true, "leadingProperty": "PropA", "columnKey": "PropA"}' >
<!-- Restrict the automatic width calculation to a minimum of 5rem and a maximum of 15rem -->
<Column customdata:p13nData='\{"autoColumnWidth": \{ "min": 5, "max": 15 }, "leadingProperty": "PropA", "columnKey": "PropA"}' >
<!-- Define extra 3rem space to the automatic content width calcuation -->
<Column customdata:p13nData='\{"autoColumnWidth": \{ "gap": 3 }, "leadingProperty": "PropA", "columnKey": "PropA"}' >
<!-- Define the visible fields that need to be calculated -->
<Column customdata:p13nData='\{"autoColumnWidth": \{ "visibleField": "PropC" }, "leadingProperty": "PropA", "additionalProperty": "PropB,PropC", "columnKey": "PropA"}' >

Note: The enableAutoColumnWidth is not a dynamic property and cannot be changed once the control has been initialized.

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

Default value is false.

setEnableCustomFilter

Sets a new value for property enableCustomFilter.

Can be used to override the filter behavior. If set to true (default), instead of the filter input box a button is rendered. When pressing this button, the SmartTable control opens the filter panel directly in the table personalization dialog.

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

Default value is true.

Since 1.40.0 After personalization dialog has been introduced in SmartTable the property <code>enableCustomFilter</code> does not make sense. When setting the property to <code>false</code>, the entered custom filter value will not be shown in personalization dialog and will also not be persisted in variant management. The custom filter will also be overwritten when rebindTable is called on the SmartTable.
setEnablePaste

Sets a new value for the enablePaste property.

setEntitySet

The entity set name from OData metadata, with which the table should be bound to

setExportType

Sets a new value for property exportType.

Specifies the type of export to be used in the SmartTable control.

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

Default value is "UI5Client".

setHeader

Sets a new value for property header.

Specifies header text that is shown in table

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

setHeaderLevel

Sets the value for the headerLevel property.

setIgnoredFields

Sets a new value for property ignoredFields.

Comma-separated value of fields that must be ignored in the OData metadata by the SmartTable control.
The SmartTable control will not create built-in columns for the fields defined by this property and will not offer these fields in table personalization.

Note:

  • Please ensure that you do not add spaces or special characters as no validation is done for this property.
  • This is not a dynamic property and cannot be changed once the control has been initialized.

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

setIgnoreFromPersonalisation

Sets a new value for property ignoreFromPersonalisation.

Comma-separated value of fields that is not shown in the personalization dialog.
This property must only be used for use cases where a technical field/column is required to fetch some data from the backend but is hidden in the table personalization and on the UI.

Note:

  • Please ensure that you do not add spaces or special characters as no validation is done for this property.
  • Visible fields/columns cannot be included in this property as this is not supported by the SmartTable control.
  • This is not a dynamic property and cannot be changed once the control has been initialized.

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

setInitiallyVisibleFields

Sets a new value for property initiallyVisibleFields.

Comma-separated value of fields that must be shown initially in the SmartTable as visible columns and in the order specified.
This property is mainly meant to be used when no LineItem annotation exists.
If you have fields in the XMLView they are always shown first; then, the columns are added based on the LineItem annotation and finally based on this property.
Note:

  • If both this property and the LineItem annotation exist, the order of fields cannot be guaranteed to be as mentioned here.
  • Please ensure that you do not add spaces or special characters as no validation is done for this property.
  • This is not a dynamic property and cannot be changed once the control has been initialized.

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

setInitialNoDataText

Sets a new value for property initialNoDataText.

The text shown initially before the control is bound and initialized. The special values $FILTERBAR or $NO_FILTERBAR can be specified to make the SmartTable control show the initial text as if the SmartFilterBar control were associated with it. If nothing is specified, the default behavior is to show the initial text based on whether the SmartFilterBar control is actually associated with the SmartTable control.

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

setNoData

Sets the aggregated noData.

setPersistencyKey

Sets a new value for property persistencyKey.

Key used to access personalization data.

Note:
This is not a dynamic property and cannot be changed once the control has been initialized.

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

setPlaceToolbarInTable

Sets a new value for property placeToolbarInTable.

Specifies whether the Toolbar control of the SmartTable is placed inside the corresponding aggregation of the inner UI5 table control.

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

Default value is false.

setRequestAtLeastFields

Sets a new value for property requestAtLeastFields.

Comma-separated value of fields that must be always requested from the backend
This property is mainly meant to be used when there is no PresentationVariant annotation.
If both this property and the PresentationVariant annotation exist, the select request sent to the backend would be a combination of both.
Note:
For AnalyticalTable (supported since 1.54), the following restrictions apply:

  • The property name(s) must not point to a new dimension or a measure.
  • The property name(s) must not point to a navigationProperty/association path, as this might not supported by analytical services.
Please ensure that you do not add spaces or special characters as no validation is done for this property.

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

setSemanticKeyAdditionalControl

Sets the aggregated semanticKeyAdditionalControl.

setSemanticObjectController

Sets the aggregated semanticObjectController.

setShowDetailsButton

Sets a new value for property showDetailsButton.

Controls the visibility of the Show / Hide Details button for the ResponsiveTable scenario.

If the available screen space gets too narrow, the columns configured with High and Medium importance move to the pop-in area while the columns with Low importance are hidden. On mobile phones, the columns with Medium importance are also hidden. As soon as the first column is hidden, this button appears in the table toolbar and gives the user the possibility to toggle the visibility of the hidden columns in the pop-in area.

Note: This is not a dynamic property and cannot be changed once the control has been initialized.

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

Default value is false.

setShowFullScreenButton

Sets a new value for property showFullScreenButton.

Controls the visibility of the FullScreen button.

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

Default value is false.

setShowPasteButton

Sets a new value for property showPasteButton.

Controls the visibility of the Paste button.

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

Default value is false.

setShowRowCount

Sets a new value for property showRowCount.

The number of rows is shown along with the header text if the property showRowCount is set to true.

Note:

  • To improve your application's performance, activate the inline count for OData bindings to avoid sending dedicated OData requests.
  • If no stable overall count can be retrieved from the binding, the count will not be displayed. This is currently the case for TreeBinding or if no count is requested by the binding.

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

Default value is true.

setShowTablePersonalisation

Sets a new value for property showTablePersonalisation.

The showTablePersonalisation attribute can be set to true or false for controlling the visibility of the TablePersonalisation button.

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

Default value is true.

setShowVariantManagement

Sets a new value for property showVariantManagement.

The showVariantManagement attribute can be set to true or false for controlling the visibility of VariantManagement button.

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

Default value is true.

setSmartFilterId

Sets a new value for property smartFilterId.

ID of the corresponding SmartFilter control; When specified, the SmartTable searches for the SmartFilter (also in the closest parent View) and attaches to the relevant events of the SmartFilter; to fetch data, show overlay etc.

Note:
This is not a dynamic property and cannot be changed once the control has been initialized.

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

setSmartVariant

Sets the associated smartVariant.

setTableBindingPath

Sets a new value for property tableBindingPath.

This attribute can be used to specify the path that is used during the binding of the table. If not specified, the entitySet attribute is used instead. (used only if binding is established after setting this property: initially due to enableAutoBinding -or- by subsequently calling rebindTable)

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

setTableType

Sets a new value for property tableType.

Specifies the type of table to be created in the SmartTable control.
Note:

  • If you add a table to the content of the SmartTable in the view, this property has no effect.
  • This is not a dynamic property and cannot be changed once the control has been initialized.

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

setToolbarStyleClass

Sets a new value for property toolbarStyleClass.

A style class which is defined for the toolbar of the table.

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

setUiState

Replaces the current UI state of the SmartTable control with the data represented in sap.ui.comp.state.UIState.
Note:
The following restrictions apply:

  • Visualizations can only be used to modify the visibility and order of columns, the template or importance of the column cannot be changed
  • MaxItems is not supported
  • RequestAtLeast contains values that are combined from both the SmartTable control property and PresentationVariant annotation, but when it is updated it only affects the internal array. The property in the SmartTable stays the same as before
  • Changes to RequestAtLeast alone will not lead to a new data request
  • RequestAtLeast is not supported in AnalyticalTable scenario
  • Any other restrictions, like the ones mentioned in sap.ui.comp.state.UIState, also apply

setUseExportToExcel

Sets a new value for property useExportToExcel.

Can be set to true or false depending on whether you want to export data to a spreadsheet application, for example Microsoft Excel.
Note:
If exportType is sap.ui.comp.smarttable.ExportType.GW, any $expand parameters are removed when sending the request to generate the spreadsheet.
As of UI5 version 1.56: If exportType is sap.ui.comp.smarttable.ExportType.UI5Client and TreeTable is used, the worksheet.hierarchyLevel property (see sap.ui.export.Spreadsheet) is filled from the binding, if the relevant information is available there for exporting hierarchical data in the spreadsheet.

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

Default value is true.

setUseInfoToolbar

Sets a new value for property useInfoToolbar.

Shows an info toolbar.
Filters that are applied using the table personalization dialog are shown in the info toolbar.
Note:

  • The default value for the property is Auto, which means that the info toolbar is shown by default if table type is ResponsiveTable.
  • The info toolbar is hidden if the property is set to Off.
  • The info toolbar is visible if the property is set to On. Currently the info toolbar is only available for the table type ResponsiveTable.
  • If multiple filters are applied to the same column, then the info toolbar contains the column name only once.
  • In case there is a custom info toolbar used for the responsive table control, then the property must be set to Off. Otherwise, an error is logged in the browser console.

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

Default value is Auto.

setUseOnlyOneSolidToolbar

Sets a new value for property useOnlyOneSolidToolbar.

If set to true, the standard toolbar and custom toolbar will be merged into one toolbar. The combined toolbar will have a solid style.

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

Default value is false.

Since 1.29 This property has no effect
setUseTablePersonalisation

Sets a new value for property useTablePersonalisation.

The useTablePersonalisation attribute can be set to true or false depending on whether you want to define personalized table settings. If you want to persist the table personalization, you need to specify the persistencyKey property.

Note:
This is not a dynamic property and cannot be changed once the control has been initialized.

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

Default value is true.

setUseVariantManagement

Sets a new value for property useVariantManagement.

The useVariantManagement attribute can be set to true or false depending on whether you want to use variants. As a prerequisite you need to specify the persistencyKey property.

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

Default value is true.

updateTableHeaderState

This can be called once data is received to update table header (count) and toolbar buttons(e.g. Excel Export) enabled state

applyVariant

Interface function for SmartVariantManagement control, sets the current variant. Note: If an application default variant exists, then all other variants are extended from this application default variant.

Param Type DefaultValue Description
oVariantJSON object

The variants json

sContext string

Describes the context in which the apply was executed

attachAfterVariantApply

Attaches event handler fnFunction to the afterVariantApply event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired after a variant has been applied.

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.comp.smarttable.SmartTable itself

attachAfterVariantInitialise

Attaches event handler fnFunction to the afterVariantInitialise event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired after variant management in the SmartTable has been initialized.

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.comp.smarttable.SmartTable itself

attachAfterVariantSave

Attaches event handler fnFunction to the afterVariantSave event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired after a variant has been saved. This event can be used to retrieve the ID of the saved variant.

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.comp.smarttable.SmartTable itself

attachBeforeExport

Attaches event handler fnFunction to the beforeExport event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired just before export is triggered.

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.comp.smarttable.SmartTable itself

attachBeforePaste

Attaches event handler fnFunction to the beforePaste event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired just before the paste event is triggered and can be used to prevent the default paste behavior.

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.comp.smarttable.SmartTable itself

attachBeforeRebindTable

Attaches event handler fnFunction to the beforeRebindTable event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired just before the binding is being done.

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.comp.smarttable.SmartTable itself

attachDataReceived

Attaches event handler fnFunction to the dataReceived event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired when data is received after binding. The event is fired if the binding for the table is done by the SmartTable itself.

Since 1.56 Use <code>beforeRebindTable</code> event to attach/listen to the binding "events" directly
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.comp.smarttable.SmartTable itself

attachDataRequested

Attaches event handler fnFunction to the dataRequested event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired when data is requested after binding. The event is fired if the binding for the table is done by the SmartTable itself.

Since 1.56 Use <code>beforeRebindTable</code> event to attach/listen to the binding "events" directly
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.comp.smarttable.SmartTable itself

attachEditToggled

Attaches event handler fnFunction to the editToggled event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired when display/edit button is clicked.

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.comp.smarttable.SmartTable itself

attachFieldChange

Attaches event handler fnFunction to the fieldChange event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired when an editable field, created internally by the SmartTable control, is changed.

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.comp.smarttable.SmartTable itself

attachFullScreenToggled

Attaches event handler fnFunction to the fullScreenToggled event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired right after the full screen mode of the SmartTable control has been changed.

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.comp.smarttable.SmartTable itself

attachInitialise

Attaches event handler fnFunction to the initialise event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired once the control has been initialized.

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.comp.smarttable.SmartTable itself

attachPaste

Attaches event handler fnFunction to the paste event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired when paste is triggered.

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.comp.smarttable.SmartTable itself

attachShowOverlay

Attaches event handler fnFunction to the showOverlay event of this sap.ui.comp.smarttable.SmartTable.

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.comp.smarttable.SmartTable itself.

This event is fired just before the overlay is being shown.

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.comp.smarttable.SmartTable itself

deactivateColumns

Deactivates existing columns in the personalization dialog based on the provided column keys.
Note: The columns are set to invisible and excluded from all panels in the table personalization. Any existing sorting, filtering or grouping in the personalization dialog for such columns will no longer be taken into account.

Param Type DefaultValue Description
aColumnKeys string[] null undefined

An array of column keys by which the corresponding columns are deactivated. If null or undefined or an empty array is passed, no column is deactivated, and all previously deactivated columns will be reset

destroyCustomToolbar

Destroys the customToolbar in the aggregation customToolbar.

destroyDataStateIndicator

Destroys the dataStateIndicator in the aggregation dataStateIndicator.

destroyNoData

Destroys the noData in the aggregation noData.

destroySemanticKeyAdditionalControl

Destroys the semanticKeyAdditionalControl in the aggregation semanticKeyAdditionalControl.

destroySemanticObjectController

Destroys the semanticObjectController in the aggregation semanticObjectController.

detachAfterVariantApply

Detaches event handler fnFunction from the afterVariantApply event of this sap.ui.comp.smarttable.SmartTable.

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

detachAfterVariantInitialise

Detaches event handler fnFunction from the afterVariantInitialise event of this sap.ui.comp.smarttable.SmartTable.

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

detachAfterVariantSave

Detaches event handler fnFunction from the afterVariantSave event of this sap.ui.comp.smarttable.SmartTable.

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

detachBeforeExport

Detaches event handler fnFunction from the beforeExport event of this sap.ui.comp.smarttable.SmartTable.

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

detachBeforePaste

Detaches event handler fnFunction from the beforePaste event of this sap.ui.comp.smarttable.SmartTable.

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

detachBeforeRebindTable

Detaches event handler fnFunction from the beforeRebindTable event of this sap.ui.comp.smarttable.SmartTable.

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

detachDataReceived

Detaches event handler fnFunction from the dataReceived event of this sap.ui.comp.smarttable.SmartTable.

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

Since 1.56 Use <code>beforeRebindTable</code> event to attach/listen to the binding "events" directly
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

detachDataRequested

Detaches event handler fnFunction from the dataRequested event of this sap.ui.comp.smarttable.SmartTable.

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

Since 1.56 Use <code>beforeRebindTable</code> event to attach/listen to the binding "events" directly
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

detachEditToggled

Detaches event handler fnFunction from the editToggled event of this sap.ui.comp.smarttable.SmartTable.

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

detachFieldChange

Detaches event handler fnFunction from the fieldChange event of this sap.ui.comp.smarttable.SmartTable.

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

detachFullScreenToggled

Detaches event handler fnFunction from the fullScreenToggled event of this sap.ui.comp.smarttable.SmartTable.

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

detachInitialise

Detaches event handler fnFunction from the initialise event of this sap.ui.comp.smarttable.SmartTable.

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

detachPaste

Detaches event handler fnFunction from the paste event of this sap.ui.comp.smarttable.SmartTable.

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

detachShowOverlay

Detaches event handler fnFunction from the showOverlay event of this sap.ui.comp.smarttable.SmartTable.

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

exit

Cleans up the control

sap.ui.comp.smarttable.SmartTable.extend

Creates a new subclass of class sap.ui.comp.smarttable.SmartTable with name sClassName and enriches it with the information contained in oClassInfo.

oClassInfo might contain the same kind of information as described in sap.m.VBox.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

fetchVariant

Interface function for SmartVariantManagement control, returns the current used variant data

fireAfterVariantApply

Fires event afterVariantApply to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

currentVariantId string

ID of the currently selected variant

fireAfterVariantInitialise

Fires event afterVariantInitialise to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireAfterVariantSave

Fires event afterVariantSave to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

currentVariantId string

ID of the currently selected variant

fireBeforeExport

Fires event beforeExport to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

exportSettings object

Contains workbook.columns, dataSource and other export-related information

userExportSettings object

Contains the export settings defined by the user

fireBeforePaste

Fires event beforePaste 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

columnInfos object[]

Contains array of column info object as determined by the SmartTable

fireBeforeRebindTable

Fires event beforeRebindTable to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireDataReceived

Fires event dataReceived to attached listeners.

Since 1.56 Use <code>beforeRebindTable</code> event to attach/listen to the binding "events" directly
Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireDataRequested

Fires event dataRequested to attached listeners.

Since 1.56 Use <code>beforeRebindTable</code> event to attach/listen to the binding "events" directly
Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireEditToggled

Fires event editToggled to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireFieldChange

Fires event fieldChange to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireFullScreenToggled

Fires event fullScreenToggled to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fullScreen boolean

If true, control is in full screen mode

fireInitialise

Fires event initialise to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

firePaste

Fires event paste to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

result object

Contains parsed/validated paste information returned by PasteHelper.parse API

fireShowOverlay

Fires event showOverlay to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

getCurrentVariantId

returns the id of the currently selected variant.

getCustomToolbar

Gets content of aggregation customToolbar.

A toolbar that can be added by the user to define their own custom buttons, icons, etc. If this is specified, the SmartTable control does not create an additional toolbar, but makes use of this one.
Note:
The CSS class sapMTBHeader-CTX is applied on the given toolbar.

getDataStateIndicator

Gets content of aggregation dataStateIndicator.

Defines an aggregation for the DataStateIndicator plugin that can be used to show binding-related messages. If the enableFiltering property of the DataStateIndicator is set to true, the SmartTable control prevents the original behavior of the DataStateIndicator and manages the filtering of binding-related messages. If a user applies or clears message filters, the SmartTable control fires the beforeRebindTable event with the messageFilterActive parameter that is used to determine whether message filtering is active or not. After the binding-related messages have been filtered by the user, all the existing filters, for example, those defined using SmartFilterBar are only taken into account once the message filter has been cleared again. Therefore the message filtering should not be used in combination with a SmartFilterBar. Required additional filters must be added by applications in the beforeRebindTable event.

getDemandPopin

Gets current value of property demandPopin.

The demandPopin attribute can be set to true or false depending on whether you want to display columns as popins on the responsive table

Default value is false.

getDetailsButtonSetting

Gets current value of property detailsButtonSetting.

Defines which columns should be hidden instead of moved into the pop-in area depending on their importance. See sap.m.Column#getImportance and sap.m.Table#getHiddenInPopin for more details.

Note: To hide columns based on their importance, it's mandatory to set showDetailsButton="true". If no priority is given, the default configuration of sap.ui.comp.smarttable.SmartTable#getShowDetailsButton is used. If this property is changed after the SmartTable has been initialized, the new changes take effect only when the Show / Hide Details button is pressed a second time.

getEditable

Gets current value of property editable.

This attribute can be used to specify if the controls created by the SmartTable control are editable. (The automatic toggle of controls works only for the SmartField/SmartToggle scenario)

Default value is false.

getEditTogglable

Gets current value of property editTogglable.

Specifies whether the editable property can be toggled via a button on the toolbar. (The automatic toggle of controls works only for the SmartField/SmartToggle scenario)

Default value is false.

getEnableAutoBinding

Gets current value of property enableAutoBinding.

When set to true, this enables automatic binding of the table using the tableBindingPath (if it exists) or entitySet property. This happens just after the initialise event has been fired.

Note:
This is not a dynamic property and cannot be changed once the control has been initialized.

Default value is false.

getEnableAutoColumnWidth

Gets current value of property enableAutoColumnWidth.

Enables heuristic column width calculation for all supported table types based on metadata information when set to true. The column width calculation takes OData type, column label, text arrangement, possible cell templates, additional fields and many other metadata parameters into account. Providing more precise MaxLength value for the Edm.String type or precision value for numeric OData types can help this algorithm to produce better results. The calculated column widths can have a minimum of 3rem and a maximum of 20rem. To avoid the heuristic column width calculation for a particular column, the CssDefaults annotation can be used.

If tableType="ResponsiveTable", the following changes are applied:

Those properties must not be managed by the application.

By default, this feature has no effect on custom columns. To enable heuristic column width calculation also for custom columns, the autoColumnWidth property must be specified in the p13nData custom data.
Note: The automatic column width calculation for custom columns works only when the width property of the custom column is not set.
Note: The custom columns can have unexpected cell templates that might affect the result of the column width calculation, for example, an Edm.Byte field that can only have three digits might be visualized as a sap.m.RatingIndicator that requires more space.
Note: Defining the leadingProperty and a unique columnKey in the p13nData custom data is a prerequisite for all other p13nData properties, including the autoColumnWidth property.
Examples with autoColumnWidth property of the p13nData custom data

<!-- Enable the automatic column width calculation for a custom column -->
<Column customdata:p13nData='\{"autoColumnWidth": true, "leadingProperty": "PropA", "columnKey": "PropA"}' >
<!-- Restrict the automatic width calculation to a minimum of 5rem and a maximum of 15rem -->
<Column customdata:p13nData='\{"autoColumnWidth": \{ "min": 5, "max": 15 }, "leadingProperty": "PropA", "columnKey": "PropA"}' >
<!-- Define extra 3rem space to the automatic content width calcuation -->
<Column customdata:p13nData='\{"autoColumnWidth": \{ "gap": 3 }, "leadingProperty": "PropA", "columnKey": "PropA"}' >
<!-- Define the visible fields that need to be calculated -->
<Column customdata:p13nData='\{"autoColumnWidth": \{ "visibleField": "PropC" }, "leadingProperty": "PropA", "additionalProperty": "PropB,PropC", "columnKey": "PropA"}' >

Note: The enableAutoColumnWidth is not a dynamic property and cannot be changed once the control has been initialized.

Default value is false.

getEnableCustomFilter

Gets current value of property enableCustomFilter.

Can be used to override the filter behavior. If set to true (default), instead of the filter input box a button is rendered. When pressing this button, the SmartTable control opens the filter panel directly in the table personalization dialog.

Default value is true.

Since 1.40.0 After personalization dialog has been introduced in SmartTable the property <code>enableCustomFilter</code> does not make sense. When setting the property to <code>false</code>, the entered custom filter value will not be shown in personalization dialog and will also not be persisted in variant management. The custom filter will also be overwritten when rebindTable is called on the SmartTable.

getEnablePaste

Gets current value of property enablePaste.

Determines whether the Paste button is enabled.

Default value is true.

getEntitySet

Gets current value of property entitySet.

The entity set name from which to fetch data and generate the columns. Note that this is not a dynamic UI5 property.

Note: It is not allowed to have one of the following strings as field names for your OData entity:

This is not a dynamic property and cannot be changed once the control has been initialized.

getExportType

Gets current value of property exportType.

Specifies the type of export to be used in the SmartTable control.

Default value is "UI5Client".

getHeader

Gets current value of property header.

Specifies header text that is shown in table

getHeaderLevel

Gets current value of property headerLevel.

Defines the semantic level of the header. For more information, see sap.m.Title#setLevel.

Default value is Auto.

getIgnoredFields

Gets current value of property ignoredFields.

Comma-separated value of fields that must be ignored in the OData metadata by the SmartTable control.
The SmartTable control will not create built-in columns for the fields defined by this property and will not offer these fields in table personalization.

Note:

getIgnoreFromPersonalisation

Gets current value of property ignoreFromPersonalisation.

Comma-separated value of fields that is not shown in the personalization dialog.
This property must only be used for use cases where a technical field/column is required to fetch some data from the backend but is hidden in the table personalization and on the UI.

Note:

getInitiallyVisibleFields

Gets current value of property initiallyVisibleFields.

Comma-separated value of fields that must be shown initially in the SmartTable as visible columns and in the order specified.
This property is mainly meant to be used when no LineItem annotation exists.
If you have fields in the XMLView they are always shown first; then, the columns are added based on the LineItem annotation and finally based on this property.
Note:

getInitialNoDataText

Gets current value of property initialNoDataText.

The text shown initially before the control is bound and initialized. The special values $FILTERBAR or $NO_FILTERBAR can be specified to make the SmartTable control show the initial text as if the SmartFilterBar control were associated with it. If nothing is specified, the default behavior is to show the initial text based on whether the SmartFilterBar control is actually associated with the SmartTable control.

sap.ui.comp.smarttable.SmartTable.getMetadata

Returns a metadata object for class sap.ui.comp.smarttable.SmartTable.

getNoData

Gets content of aggregation noData.

The value for the noData aggregation can be either a string value or a control instance.
The control is shown, in case there is no data for the Table available. In case of a string value this will simply replace the no data text.
Currently the Responsive Table only supports string values.

getPersistencyKey

Gets current value of property persistencyKey.

Key used to access personalization data.

Note:
This is not a dynamic property and cannot be changed once the control has been initialized.

getPlaceToolbarInTable

Gets current value of property placeToolbarInTable.

Specifies whether the Toolbar control of the SmartTable is placed inside the corresponding aggregation of the inner UI5 table control.

Default value is false.

getRequestAtLeastFields

Gets current value of property requestAtLeastFields.

Comma-separated value of fields that must be always requested from the backend
This property is mainly meant to be used when there is no PresentationVariant annotation.
If both this property and the PresentationVariant annotation exist, the select request sent to the backend would be a combination of both.
Note:
For AnalyticalTable (supported since 1.54), the following restrictions apply:

Please ensure that you do not add spaces or special characters as no validation is done for this property.

getSemanticKeyAdditionalControl

Gets content of aggregation semanticKeyAdditionalControl.

Allows users to specify an additional control that will be added to a VBox for the first semantic key field.
Note:
This property is not meant for public use.

getSemanticObjectController

Gets content of aggregation semanticObjectController.

The Semantic Object Controller allows the user to specify and overwrite functionality for semantic object navigation.

getShowDetailsButton

Gets current value of property showDetailsButton.

Controls the visibility of the Show / Hide Details button for the ResponsiveTable scenario.

If the available screen space gets too narrow, the columns configured with High and Medium importance move to the pop-in area while the columns with Low importance are hidden. On mobile phones, the columns with Medium importance are also hidden. As soon as the first column is hidden, this button appears in the table toolbar and gives the user the possibility to toggle the visibility of the hidden columns in the pop-in area.

Note: This is not a dynamic property and cannot be changed once the control has been initialized.

Default value is false.

getShowFullScreenButton

Gets current value of property showFullScreenButton.

Controls the visibility of the FullScreen button.

Default value is false.

getShowPasteButton

Gets current value of property showPasteButton.

Controls the visibility of the Paste button.

Default value is false.

getShowRowCount

Gets current value of property showRowCount.

The number of rows is shown along with the header text if the property showRowCount is set to true.

Note:

Default value is true.

getShowTablePersonalisation

Gets current value of property showTablePersonalisation.

The showTablePersonalisation attribute can be set to true or false for controlling the visibility of the TablePersonalisation button.

Default value is true.

getShowVariantManagement

Gets current value of property showVariantManagement.

The showVariantManagement attribute can be set to true or false for controlling the visibility of VariantManagement button.

Default value is true.

getSmartFilterId

Gets current value of property smartFilterId.

ID of the corresponding SmartFilter control; When specified, the SmartTable searches for the SmartFilter (also in the closest parent View) and attaches to the relevant events of the SmartFilter; to fetch data, show overlay etc.

Note:
This is not a dynamic property and cannot be changed once the control has been initialized.

getSmartVariant

ID of the element which is the current target of the association smartVariant, or null.

getTable

returns the internally used table object

getTableBindingPath

Gets current value of property tableBindingPath.

This attribute can be used to specify the path that is used during the binding of the table. If not specified, the entitySet attribute is used instead. (used only if binding is established after setting this property: initially due to enableAutoBinding -or- by subsequently calling rebindTable)

getTableType

Gets current value of property tableType.

Specifies the type of table to be created in the SmartTable control.
Note:

getToolbar

Returns the Toolbar instance used inside the SmartTable control.

getToolbarStyleClass

Gets current value of property toolbarStyleClass.

A style class which is defined for the toolbar of the table.

getUiState

Returns the current UI state of the SmartTable control.
Note:
The following restrictions apply:

getUseExportToExcel

Gets current value of property useExportToExcel.

Can be set to true or false depending on whether you want to export data to a spreadsheet application, for example Microsoft Excel.
Note:
If exportType is sap.ui.comp.smarttable.ExportType.GW, any $expand parameters are removed when sending the request to generate the spreadsheet.
As of UI5 version 1.56: If exportType is sap.ui.comp.smarttable.ExportType.UI5Client and TreeTable is used, the worksheet.hierarchyLevel property (see sap.ui.export.Spreadsheet) is filled from the binding, if the relevant information is available there for exporting hierarchical data in the spreadsheet.

Default value is true.

getUseInfoToolbar

Gets current value of property useInfoToolbar.

Shows an info toolbar.
Filters that are applied using the table personalization dialog are shown in the info toolbar.
Note:

Default value is Auto.

getUseOnlyOneSolidToolbar

Gets current value of property useOnlyOneSolidToolbar.

If set to true, the standard toolbar and custom toolbar will be merged into one toolbar. The combined toolbar will have a solid style.

Default value is false.

Since 1.29 This property has no effect

getUseTablePersonalisation

Gets current value of property useTablePersonalisation.

The useTablePersonalisation attribute can be set to true or false depending on whether you want to define personalized table settings. If you want to persist the table personalization, you need to specify the persistencyKey property.

Note:
This is not a dynamic property and cannot be changed once the control has been initialized.

Default value is true.

getUseVariantManagement

Gets current value of property useVariantManagement.

The useVariantManagement attribute can be set to true or false depending on whether you want to use variants. As a prerequisite you need to specify the persistencyKey property.

Default value is true.

getVariantManagement

Returns the associated SmartVariantManagement control.

isInitialised

Checks whether the control is initialised

openDialogForKeyUser

Opens the View Settings Dialog for the UI adaptation.
Note: This function must only be used internally during the UI adaptation.

Param Type DefaultValue Description
sStyleClass String

indicating the ui adaption area

fCallBack function

will be executed, once the dialog closes.

openPersonalisationDialog

Opens the desired panel of the personalization dialog.
Note: Calling this for panels that are globally hidden (E.g. manually by the application, or due to unavailability of functionality) leads to an empty dialog being shown.

Param Type DefaultValue Description
sPanel string

The desired panel; the value is either "Columns", "Sort", "Filter" or "Group"

rebindTable

This can be used to trigger binding on the table used in the SmartTable

Param Type DefaultValue Description
bForceRebind boolean

force bind call to be triggered on the inner table

setCurrentVariantId

Set the current variant according to the sVariantId. In case an empty string or null or undefined was passed the STANDARD will be set. STANDARD will also be set, in case the passed sVariantId could not be found. In case neither a flexibility variant, nor the content for the standard variant could not be obtained, nor the personalisable control obtained nothing will be executed/changed

Param Type DefaultValue Description
sVariantId string

id of the currently selected variant

setCustomToolbar

Sets the aggregated customToolbar.

Param Type DefaultValue Description
oCustomToolbar sap.m.Toolbar

The customToolbar to set

setDataStateIndicator

Sets the aggregated dataStateIndicator.

Param Type DefaultValue Description
oDataStateIndicator sap.m.plugins.DataStateIndicator

The dataStateIndicator to set

setDemandPopin

Sets a new value for property demandPopin.

The demandPopin attribute can be set to true or false depending on whether you want to display columns as popins on the responsive table

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

Default value is false.

Param Type DefaultValue Description
bDemandPopin boolean false

New value for property demandPopin

setDetailsButtonSetting

Sets a new value for property detailsButtonSetting.

Defines which columns should be hidden instead of moved into the pop-in area depending on their importance. See sap.m.Column#getImportance and sap.m.Table#getHiddenInPopin for more details.

Note: To hide columns based on their importance, it's mandatory to set showDetailsButton="true". If no priority is given, the default configuration of sap.ui.comp.smarttable.SmartTable#getShowDetailsButton is used. If this property is changed after the SmartTable has been initialized, the new changes take effect only when the Show / Hide Details button is pressed a second time.

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

Param Type DefaultValue Description
sDetailsButtonSetting sap.ui.core.Priority[]

New value for property detailsButtonSetting

setEditable

Sets a new value for property editable.

This attribute can be used to specify if the controls created by the SmartTable control are editable. (The automatic toggle of controls works only for the SmartField/SmartToggle scenario)

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

Default value is false.

Param Type DefaultValue Description
bEditable boolean false

New value for property editable

setEditTogglable

Sets a new value for property editTogglable.

Specifies whether the editable property can be toggled via a button on the toolbar. (The automatic toggle of controls works only for the SmartField/SmartToggle scenario)

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

Default value is false.

Param Type DefaultValue Description
bEditTogglable boolean false

New value for property editTogglable

setEnableAutoBinding

Sets a new value for property enableAutoBinding.

When set to true, this enables automatic binding of the table using the tableBindingPath (if it exists) or entitySet property. This happens just after the initialise event has been fired.

Note:
This is not a dynamic property and cannot be changed once the control has been initialized.

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

Default value is false.

Param Type DefaultValue Description
bEnableAutoBinding boolean false

New value for property enableAutoBinding

setEnableAutoColumnWidth

Sets a new value for property enableAutoColumnWidth.

Enables heuristic column width calculation for all supported table types based on metadata information when set to true. The column width calculation takes OData type, column label, text arrangement, possible cell templates, additional fields and many other metadata parameters into account. Providing more precise MaxLength value for the Edm.String type or precision value for numeric OData types can help this algorithm to produce better results. The calculated column widths can have a minimum of 3rem and a maximum of 20rem. To avoid the heuristic column width calculation for a particular column, the CssDefaults annotation can be used.

If tableType="ResponsiveTable", the following changes are applied:

Those properties must not be managed by the application.

By default, this feature has no effect on custom columns. To enable heuristic column width calculation also for custom columns, the autoColumnWidth property must be specified in the p13nData custom data.
Note: The automatic column width calculation for custom columns works only when the width property of the custom column is not set.
Note: The custom columns can have unexpected cell templates that might affect the result of the column width calculation, for example, an Edm.Byte field that can only have three digits might be visualized as a sap.m.RatingIndicator that requires more space.
Note: Defining the leadingProperty and a unique columnKey in the p13nData custom data is a prerequisite for all other p13nData properties, including the autoColumnWidth property.
Examples with autoColumnWidth property of the p13nData custom data

<!-- Enable the automatic column width calculation for a custom column -->
<Column customdata:p13nData='\{"autoColumnWidth": true, "leadingProperty": "PropA", "columnKey": "PropA"}' >
<!-- Restrict the automatic width calculation to a minimum of 5rem and a maximum of 15rem -->
<Column customdata:p13nData='\{"autoColumnWidth": \{ "min": 5, "max": 15 }, "leadingProperty": "PropA", "columnKey": "PropA"}' >
<!-- Define extra 3rem space to the automatic content width calcuation -->
<Column customdata:p13nData='\{"autoColumnWidth": \{ "gap": 3 }, "leadingProperty": "PropA", "columnKey": "PropA"}' >
<!-- Define the visible fields that need to be calculated -->
<Column customdata:p13nData='\{"autoColumnWidth": \{ "visibleField": "PropC" }, "leadingProperty": "PropA", "additionalProperty": "PropB,PropC", "columnKey": "PropA"}' >

Note: The enableAutoColumnWidth is not a dynamic property and cannot be changed once the control has been initialized.

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

Default value is false.

Param Type DefaultValue Description
bEnableAutoColumnWidth boolean false

New value for property enableAutoColumnWidth

setEnableCustomFilter

Sets a new value for property enableCustomFilter.

Can be used to override the filter behavior. If set to true (default), instead of the filter input box a button is rendered. When pressing this button, the SmartTable control opens the filter panel directly in the table personalization dialog.

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

Default value is true.

Since 1.40.0 After personalization dialog has been introduced in SmartTable the property <code>enableCustomFilter</code> does not make sense. When setting the property to <code>false</code>, the entered custom filter value will not be shown in personalization dialog and will also not be persisted in variant management. The custom filter will also be overwritten when rebindTable is called on the SmartTable.
Param Type DefaultValue Description
bEnableCustomFilter boolean true

New value for property enableCustomFilter

setEnablePaste

Sets a new value for the enablePaste property.

Param Type DefaultValue Description
bValue boolean

New value for property enablePaste

setEntitySet

The entity set name from OData metadata, with which the table should be bound to

Param Type DefaultValue Description
sEntitySetName string

The entity set

setExportType

Sets a new value for property exportType.

Specifies the type of export to be used in the SmartTable control.

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

Default value is "UI5Client".

Param Type DefaultValue Description
sExportType sap.ui.comp.smarttable.ExportType "UI5Client"

New value for property exportType

setHeader

Sets a new value for property header.

Specifies header text that is shown in table

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

Param Type DefaultValue Description
sHeader string

New value for property header

setHeaderLevel

Sets the value for the headerLevel property.

Param Type DefaultValue Description
sLevel string

The level that is set to the header

setIgnoredFields

Sets a new value for property ignoredFields.

Comma-separated value of fields that must be ignored in the OData metadata by the SmartTable control.
The SmartTable control will not create built-in columns for the fields defined by this property and will not offer these fields in table personalization.

Note:

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

Param Type DefaultValue Description
sIgnoredFields string

New value for property ignoredFields

setIgnoreFromPersonalisation

Sets a new value for property ignoreFromPersonalisation.

Comma-separated value of fields that is not shown in the personalization dialog.
This property must only be used for use cases where a technical field/column is required to fetch some data from the backend but is hidden in the table personalization and on the UI.

Note:

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

Param Type DefaultValue Description
sIgnoreFromPersonalisation string

New value for property ignoreFromPersonalisation

setInitiallyVisibleFields

Sets a new value for property initiallyVisibleFields.

Comma-separated value of fields that must be shown initially in the SmartTable as visible columns and in the order specified.
This property is mainly meant to be used when no LineItem annotation exists.
If you have fields in the XMLView they are always shown first; then, the columns are added based on the LineItem annotation and finally based on this property.
Note:

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

Param Type DefaultValue Description
sInitiallyVisibleFields string

New value for property initiallyVisibleFields

setInitialNoDataText

Sets a new value for property initialNoDataText.

The text shown initially before the control is bound and initialized. The special values $FILTERBAR or $NO_FILTERBAR can be specified to make the SmartTable control show the initial text as if the SmartFilterBar control were associated with it. If nothing is specified, the default behavior is to show the initial text based on whether the SmartFilterBar control is actually associated with the SmartTable control.

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

Param Type DefaultValue Description
sInitialNoDataText string

New value for property initialNoDataText

setNoData

Sets the aggregated noData.

Param Type DefaultValue Description
vNoData sap.ui.core.Control string

The noData to set

setPersistencyKey

Sets a new value for property persistencyKey.

Key used to access personalization data.

Note:
This is not a dynamic property and cannot be changed once the control has been initialized.

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

Param Type DefaultValue Description
sPersistencyKey string

New value for property persistencyKey

setPlaceToolbarInTable

Sets a new value for property placeToolbarInTable.

Specifies whether the Toolbar control of the SmartTable is placed inside the corresponding aggregation of the inner UI5 table control.

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

Default value is false.

Param Type DefaultValue Description
bPlaceToolbarInTable boolean false

New value for property placeToolbarInTable

setRequestAtLeastFields

Sets a new value for property requestAtLeastFields.

Comma-separated value of fields that must be always requested from the backend
This property is mainly meant to be used when there is no PresentationVariant annotation.
If both this property and the PresentationVariant annotation exist, the select request sent to the backend would be a combination of both.
Note:
For AnalyticalTable (supported since 1.54), the following restrictions apply:

Please ensure that you do not add spaces or special characters as no validation is done for this property.

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

Param Type DefaultValue Description
sRequestAtLeastFields string

New value for property requestAtLeastFields

setSemanticKeyAdditionalControl

Sets the aggregated semanticKeyAdditionalControl.

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

The semanticKeyAdditionalControl to set

setSemanticObjectController

Sets the aggregated semanticObjectController.

Param Type DefaultValue Description
oSemanticObjectController sap.ui.comp.navpopover.SemanticObjectController

The semanticObjectController to set

setShowDetailsButton

Sets a new value for property showDetailsButton.

Controls the visibility of the Show / Hide Details button for the ResponsiveTable scenario.

If the available screen space gets too narrow, the columns configured with High and Medium importance move to the pop-in area while the columns with Low importance are hidden. On mobile phones, the columns with Medium importance are also hidden. As soon as the first column is hidden, this button appears in the table toolbar and gives the user the possibility to toggle the visibility of the hidden columns in the pop-in area.

Note: This is not a dynamic property and cannot be changed once the control has been initialized.

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

Default value is false.

Param Type DefaultValue Description
bShowDetailsButton boolean false

New value for property showDetailsButton

setShowFullScreenButton

Sets a new value for property showFullScreenButton.

Controls the visibility of the FullScreen button.

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

Default value is false.

Param Type DefaultValue Description
bShowFullScreenButton boolean false

New value for property showFullScreenButton

setShowPasteButton

Sets a new value for property showPasteButton.

Controls the visibility of the Paste button.

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

Default value is false.

Param Type DefaultValue Description
bShowPasteButton boolean false

New value for property showPasteButton

setShowRowCount

Sets a new value for property showRowCount.

The number of rows is shown along with the header text if the property showRowCount is set to true.

Note:

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

New value for property showRowCount

setShowTablePersonalisation

Sets a new value for property showTablePersonalisation.

The showTablePersonalisation attribute can be set to true or false for controlling the visibility of the TablePersonalisation button.

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

New value for property showTablePersonalisation

setShowVariantManagement

Sets a new value for property showVariantManagement.

The showVariantManagement attribute can be set to true or false for controlling the visibility of VariantManagement button.

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

New value for property showVariantManagement

setSmartFilterId

Sets a new value for property smartFilterId.

ID of the corresponding SmartFilter control; When specified, the SmartTable searches for the SmartFilter (also in the closest parent View) and attaches to the relevant events of the SmartFilter; to fetch data, show overlay etc.

Note:
This is not a dynamic property and cannot be changed once the control has been initialized.

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

Param Type DefaultValue Description
sSmartFilterId string

New value for property smartFilterId

setSmartVariant

Sets the associated smartVariant.

Param Type DefaultValue Description
oSmartVariant sap.ui.core.ID sap.ui.core.Control

ID of an element which becomes the new target of this smartVariant association; alternatively, an element instance may be given

setTableBindingPath

Sets a new value for property tableBindingPath.

This attribute can be used to specify the path that is used during the binding of the table. If not specified, the entitySet attribute is used instead. (used only if binding is established after setting this property: initially due to enableAutoBinding -or- by subsequently calling rebindTable)

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

Param Type DefaultValue Description
sTableBindingPath string

New value for property tableBindingPath

setTableType

Sets a new value for property tableType.

Specifies the type of table to be created in the SmartTable control.
Note:

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

Param Type DefaultValue Description
sTableType sap.ui.comp.smarttable.TableType

New value for property tableType

setToolbarStyleClass

Sets a new value for property toolbarStyleClass.

A style class which is defined for the toolbar of the table.

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

Param Type DefaultValue Description
sToolbarStyleClass string

New value for property toolbarStyleClass

setUiState

Replaces the current UI state of the SmartTable control with the data represented in sap.ui.comp.state.UIState.
Note:
The following restrictions apply:

Param Type DefaultValue Description
oUIState sap.ui.comp.state.UIState

the new representation of UI state

setUseExportToExcel

Sets a new value for property useExportToExcel.

Can be set to true or false depending on whether you want to export data to a spreadsheet application, for example Microsoft Excel.
Note:
If exportType is sap.ui.comp.smarttable.ExportType.GW, any $expand parameters are removed when sending the request to generate the spreadsheet.
As of UI5 version 1.56: If exportType is sap.ui.comp.smarttable.ExportType.UI5Client and TreeTable is used, the worksheet.hierarchyLevel property (see sap.ui.export.Spreadsheet) is filled from the binding, if the relevant information is available there for exporting hierarchical data in the spreadsheet.

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

New value for property useExportToExcel

setUseInfoToolbar

Sets a new value for property useInfoToolbar.

Shows an info toolbar.
Filters that are applied using the table personalization dialog are shown in the info toolbar.
Note:

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

Default value is Auto.

Param Type DefaultValue Description
sUseInfoToolbar sap.ui.comp.smarttable.InfoToolbarBehavior Auto

New value for property useInfoToolbar

setUseOnlyOneSolidToolbar

Sets a new value for property useOnlyOneSolidToolbar.

If set to true, the standard toolbar and custom toolbar will be merged into one toolbar. The combined toolbar will have a solid style.

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

Default value is false.

Since 1.29 This property has no effect
Param Type DefaultValue Description
bUseOnlyOneSolidToolbar boolean false

New value for property useOnlyOneSolidToolbar

setUseTablePersonalisation

Sets a new value for property useTablePersonalisation.

The useTablePersonalisation attribute can be set to true or false depending on whether you want to define personalized table settings. If you want to persist the table personalization, you need to specify the persistencyKey property.

Note:
This is not a dynamic property and cannot be changed once the control has been initialized.

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

New value for property useTablePersonalisation

setUseVariantManagement

Sets a new value for property useVariantManagement.

The useVariantManagement attribute can be set to true or false depending on whether you want to use variants. As a prerequisite you need to specify the persistencyKey property.

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

New value for property useVariantManagement

updateTableHeaderState

This can be called once data is received to update table header (count) and toolbar buttons(e.g. Excel Export) enabled state