class sap.m.P13nColumnsPanel

Control sample: sap.m.P13nColumnsPanel
Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Extends: sap.m.P13nPanel
Module: sap/m/P13nColumnsPanel
Application Component: CA-UI5-CMP

The P13nColumnsPanel control is used to define column-specific settings for table personalization.


Constructor

Constructor for a new P13nColumnsPanel.

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.m.P13nColumnsPanel(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
visibleItemsThreshold int -1

Specifies a threshold of visible items. If the end user makes a lot of columns visible, this might cause performance to slow down. When this happens, the user can receive a corresponding warning triggered by the visibleItemsThreshold property. The property needs to be activated and set to the required value by the consuming application to ensure that the warning message is shown when the threshold has been exceeded. In the following example the message will be shown if more than 100 visible columns are selected:

customData>
core:CustomData key="p13nDialogSettings"
value='\{"columns":\{"visible": true, "payload": \{"visibleItemsThreshold": 3\}\}\}' />
/customData>


Since: 1.26.7.

Visibility: public

Borrowed Properties

Name Type Default Value Description
changeNotifier object

Callback which notifies a change on this panel.

Visibility: public
title string

Title text appears in the panel.

Visibility: public
titleLarge string

Large title text appears e.g. in dialog header in case that only one panel is shown.

Since: 1.30.0.

Visibility: public
type string

Panel type for generic use. Due to extensibility reason the type of type property should be string. So it is feasible to add a custom panel without expanding the type.

Visibility: public
validationExecutor object

Callback method which is called in order to validate end user entry.

Visibility: public
validationListener object

Callback method which is called in order to register for validation result.

Visibility: public
verticalScrolling boolean true

Enables the vertical Scrolling on the P13nDialog when the panel is shown.

Visibility: public

Aggregations

Default Aggregation:

Name Cardinality Type Description
columnsItems 0..n sap.m.P13nColumnsItem

List of columns that has been changed.

Since: 1.26.0.

content 0..n sap.ui.core.Control

Internal aggregation for the toolbar content.

Borrowed Aggregations

Name Cardinality Type Description
items 0..n sap.m.P13nItem

Defines personalization items (e.g. columns in the P13nColumnsPanel).


Events Overview

Event Description
addColumnsItem

Event raised when a columnsItem is added.

Since: 1.26.0.

changeColumnsItems

Event raised if columnsItems is changed or new one needs to be created in the model.

Since: 1.26.7.

setData

Event raised if setData is called in model. The event serves the purpose of minimizing such calls since they can take up a lot of performance.

Since: 1.26.7.

addColumnsItem

Event raised when a columnsItem is added.

Since: 1.26.0.

replaced by extended event {@link sap.m.P13nColumnsPanel#event:changeColumnsItems}
Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
newItem sap.m.P13nColumnsItem

columnsItem that needs to be added in the model.

changeColumnsItems

Event raised if columnsItems is changed or new one needs to be created in the model.

Since: 1.26.7.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
newItems sap.m.P13nColumnsItem[]

Contains columnsItems that needs to be created in the model. Deprecated as of version 1.50, replaced by new parameter items.

existingItems sap.m.P13nColumnsItem[]

Contains columnsItems that needs to be changed in the model. Deprecated as of version 1.50, replaced by new parameter items.

items object[]

Array contains an object for each item in items aggregation enriched with index and visibility information. The item order reflects the current order of columns in the panel.

Since: 1.50.0.

setData

Event raised if setData is called in model. The event serves the purpose of minimizing such calls since they can take up a lot of performance.

Since: 1.26.7.

the event <code>setData</code> is obsolete.
Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object

Methods Overview

Method Description
addColumnsItem

Adds some columnsItem to the aggregation columnsItems.

attachAddColumnsItem

Attaches event handler fnFunction to the addColumnsItem event of this sap.m.P13nColumnsPanel.

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.m.P13nColumnsPanel itself.

Event raised when a columnsItem is added.

Since 1.50 replaced by extended event {@link sap.m.P13nColumnsPanel#event:changeColumnsItems}
attachChangeColumnsItems

Attaches event handler fnFunction to the changeColumnsItems event of this sap.m.P13nColumnsPanel.

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.m.P13nColumnsPanel itself.

Event raised if columnsItems is changed or new one needs to be created in the model.

attachSetData

Attaches event handler fnFunction to the setData event of this sap.m.P13nColumnsPanel.

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.m.P13nColumnsPanel itself.

Event raised if setData is called in model. The event serves the purpose of minimizing such calls since they can take up a lot of performance.

Since 1.50 the event <code>setData</code> is obsolete.
bindColumnsItems

Binds aggregation columnsItems to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

destroyColumnsItems

Destroys all the columnsItems in the aggregation columnsItems.

detachAddColumnsItem

Detaches event handler fnFunction from the addColumnsItem event of this sap.m.P13nColumnsPanel.

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

Since 1.50 replaced by extended event {@link sap.m.P13nColumnsPanel#event:changeColumnsItems}
detachChangeColumnsItems

Detaches event handler fnFunction from the changeColumnsItems event of this sap.m.P13nColumnsPanel.

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

detachSetData

Detaches event handler fnFunction from the setData event of this sap.m.P13nColumnsPanel.

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

Since 1.50 the event <code>setData</code> is obsolete.
sap.m.P13nColumnsPanel.extend

Creates a new subclass of class sap.m.P13nColumnsPanel 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.P13nPanel.extend.

fireAddColumnsItem

Fires event addColumnsItem to attached listeners.

Since 1.50 replaced by extended event {@link sap.m.P13nColumnsPanel#event:changeColumnsItems}
fireChangeColumnsItems

Fires event changeColumnsItems to attached listeners.

fireSetData

Fires event setData to attached listeners.

Since 1.50 the event <code>setData</code> is obsolete.
getColumnsItems

Gets content of aggregation columnsItems.

List of columns that has been changed.

sap.m.P13nColumnsPanel.getMetadata

Returns a metadata object for class sap.m.P13nColumnsPanel.

getOkPayload

Delivers a payload for columnsPanel that can be used at consumer side

getResetPayload

Delivers a payload for columnsPanel that can be used at consumer side

getVisibleItemsThreshold

Gets current value of property visibleItemsThreshold.

Specifies a threshold of visible items. If the end user makes a lot of columns visible, this might cause performance to slow down. When this happens, the user can receive a corresponding warning triggered by the visibleItemsThreshold property. The property needs to be activated and set to the required value by the consuming application to ensure that the warning message is shown when the threshold has been exceeded. In the following example the message will be shown if more than 100 visible columns are selected:

customData>
core:CustomData key="p13nDialogSettings"
value='\{"columns":\{"visible": true, "payload": \{"visibleItemsThreshold": 3\}\}\}' />
/customData>

Default value is -1.

indexOfColumnsItem

Checks for the provided sap.m.P13nColumnsItem in the aggregation columnsItems. and returns its index if found or -1 otherwise.

insertColumnsItem

Inserts a columnsItem into the aggregation columnsItems.

reInitialize

This method does a re-initialization of the panel

removeAllColumnsItems

Removes all the controls from the aggregation columnsItems.

Additionally, it unregisters them from the hosting UIArea.

removeColumnsItem

Removes a columnsItem from the aggregation columnsItems.

setVisibleItemsThreshold

Sets a new value for property visibleItemsThreshold.

Specifies a threshold of visible items. If the end user makes a lot of columns visible, this might cause performance to slow down. When this happens, the user can receive a corresponding warning triggered by the visibleItemsThreshold property. The property needs to be activated and set to the required value by the consuming application to ensure that the warning message is shown when the threshold has been exceeded. In the following example the message will be shown if more than 100 visible columns are selected:

customData>
core:CustomData key="p13nDialogSettings"
value='\{"columns":\{"visible": true, "payload": \{"visibleItemsThreshold": 3\}\}\}' />
/customData>

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

Default value is -1.

unbindColumnsItems

Unbinds aggregation columnsItems from model data.

addColumnsItem

Adds some columnsItem to the aggregation columnsItems.

Param Type DefaultValue Description
oColumnsItem sap.m.P13nColumnsItem

The columnsItem to add; if empty, nothing is inserted

attachAddColumnsItem

Attaches event handler fnFunction to the addColumnsItem event of this sap.m.P13nColumnsPanel.

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.m.P13nColumnsPanel itself.

Event raised when a columnsItem is added.

Since 1.50 replaced by extended event {@link sap.m.P13nColumnsPanel#event:changeColumnsItems}
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.m.P13nColumnsPanel itself

attachChangeColumnsItems

Attaches event handler fnFunction to the changeColumnsItems event of this sap.m.P13nColumnsPanel.

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.m.P13nColumnsPanel itself.

Event raised if columnsItems is changed or new one needs to be created in the model.

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.m.P13nColumnsPanel itself

attachSetData

Attaches event handler fnFunction to the setData event of this sap.m.P13nColumnsPanel.

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.m.P13nColumnsPanel itself.

Event raised if setData is called in model. The event serves the purpose of minimizing such calls since they can take up a lot of performance.

Since 1.50 the event <code>setData</code> is obsolete.
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.m.P13nColumnsPanel itself

bindColumnsItems

Binds aggregation columnsItems to model data.

See ManagedObject.bindAggregation for a detailed description of the possible properties of oBindingInfo.

Param Type DefaultValue Description
oBindingInfo sap.ui.base.ManagedObject.AggregationBindingInfo

The binding information

destroyColumnsItems

Destroys all the columnsItems in the aggregation columnsItems.

detachAddColumnsItem

Detaches event handler fnFunction from the addColumnsItem event of this sap.m.P13nColumnsPanel.

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

Since 1.50 replaced by extended event {@link sap.m.P13nColumnsPanel#event:changeColumnsItems}
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

detachChangeColumnsItems

Detaches event handler fnFunction from the changeColumnsItems event of this sap.m.P13nColumnsPanel.

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

detachSetData

Detaches event handler fnFunction from the setData event of this sap.m.P13nColumnsPanel.

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

Since 1.50 the event <code>setData</code> is obsolete.
Param Type DefaultValue Description
fnFunction function(sap.ui.base.Event) : void

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

sap.m.P13nColumnsPanel.extend

Creates a new subclass of class sap.m.P13nColumnsPanel 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.P13nPanel.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

fireAddColumnsItem

Fires event addColumnsItem to attached listeners.

Since 1.50 replaced by extended event {@link sap.m.P13nColumnsPanel#event:changeColumnsItems}
Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

newItem sap.m.P13nColumnsItem

columnsItem that needs to be added in the model.

fireChangeColumnsItems

Fires event changeColumnsItems to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

newItems sap.m.P13nColumnsItem[]

Contains columnsItems that needs to be created in the model. Deprecated as of version 1.50, replaced by new parameter items.

existingItems sap.m.P13nColumnsItem[]

Contains columnsItems that needs to be changed in the model. Deprecated as of version 1.50, replaced by new parameter items.

items object[]

Array contains an object for each item in items aggregation enriched with index and visibility information. The item order reflects the current order of columns in the panel.

fireSetData

Fires event setData to attached listeners.

Since 1.50 the event <code>setData</code> is obsolete.
Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

getColumnsItems

Gets content of aggregation columnsItems.

List of columns that has been changed.

sap.m.P13nColumnsPanel.getMetadata

Returns a metadata object for class sap.m.P13nColumnsPanel.

getOkPayload

Delivers a payload for columnsPanel that can be used at consumer side

getResetPayload

Delivers a payload for columnsPanel that can be used at consumer side

getVisibleItemsThreshold

Gets current value of property visibleItemsThreshold.

Specifies a threshold of visible items. If the end user makes a lot of columns visible, this might cause performance to slow down. When this happens, the user can receive a corresponding warning triggered by the visibleItemsThreshold property. The property needs to be activated and set to the required value by the consuming application to ensure that the warning message is shown when the threshold has been exceeded. In the following example the message will be shown if more than 100 visible columns are selected:

customData>
core:CustomData key="p13nDialogSettings"
value='\{"columns":\{"visible": true, "payload": \{"visibleItemsThreshold": 3\}\}\}' />
/customData>

Default value is -1.

indexOfColumnsItem

Checks for the provided sap.m.P13nColumnsItem in the aggregation columnsItems. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oColumnsItem sap.m.P13nColumnsItem

The columnsItem whose index is looked for

insertColumnsItem

Inserts a columnsItem into the aggregation columnsItems.

Param Type DefaultValue Description
oColumnsItem sap.m.P13nColumnsItem

The columnsItem to insert; if empty, nothing is inserted

iIndex int

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

reInitialize

This method does a re-initialization of the panel

removeAllColumnsItems

Removes all the controls from the aggregation columnsItems.

Additionally, it unregisters them from the hosting UIArea.

removeColumnsItem

Removes a columnsItem from the aggregation columnsItems.

Param Type DefaultValue Description
vColumnsItem int string sap.m.P13nColumnsItem

The columnsItem to remove or its index or id

setVisibleItemsThreshold

Sets a new value for property visibleItemsThreshold.

Specifies a threshold of visible items. If the end user makes a lot of columns visible, this might cause performance to slow down. When this happens, the user can receive a corresponding warning triggered by the visibleItemsThreshold property. The property needs to be activated and set to the required value by the consuming application to ensure that the warning message is shown when the threshold has been exceeded. In the following example the message will be shown if more than 100 visible columns are selected:

customData>
core:CustomData key="p13nDialogSettings"
value='\{"columns":\{"visible": true, "payload": \{"visibleItemsThreshold": 3\}\}\}' />
/customData>

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

Default value is -1.

Param Type DefaultValue Description
iVisibleItemsThreshold int -1

New value for property visibleItemsThreshold

unbindColumnsItems

Unbinds aggregation columnsItems from model data.