class sap.m.P13nSortPanel

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

The P13nSortPanel control is used to define settings for sorting in table personalization.


Constructor

Constructor for a new P13nSortPanel.

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.P13nSortPanel(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
containerQuery boolean false

defines if the mediaQuery or a ContainerResize will be used for layout update. When the ConditionPanel is used on a dialog the property should be set to true!

Visibility: public
layoutMode string

can be used to control the layout behavior. Default is "" which will automatically change the layout. With "Desktop", "Table" or "Phone" you can set a fixed layout.

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
content 0..n sap.ui.core.Control

content for include and exclude panels

sortItems 0..n sap.m.P13nSortItem

defined Sort Items

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
addSortItem

event raised when a SortItem was added

removeSortItem

event raised when a SortItem was removed

updateSortItem

event raised when a SortItem was updated

addSortItem

event raised when a SortItem was added

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

removeSortItem

event raised when a SortItem was removed

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

updateSortItem

event raised when a SortItem was updated

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

Methods Overview

Method Description
addSortItem

Adds some sortItem to the aggregation sortItems.

attachAddSortItem

Attaches event handler fnFunction to the addSortItem event of this sap.m.P13nSortPanel.

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

event raised when a SortItem was added

attachRemoveSortItem

Attaches event handler fnFunction to the removeSortItem event of this sap.m.P13nSortPanel.

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

event raised when a SortItem was removed

attachUpdateSortItem

Attaches event handler fnFunction to the updateSortItem event of this sap.m.P13nSortPanel.

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

event raised when a SortItem was updated

bindSortItems

Binds aggregation sortItems to model data.

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

destroySortItems

Destroys all the sortItems in the aggregation sortItems.

detachAddSortItem

Detaches event handler fnFunction from the addSortItem event of this sap.m.P13nSortPanel.

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

detachRemoveSortItem

Detaches event handler fnFunction from the removeSortItem event of this sap.m.P13nSortPanel.

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

detachUpdateSortItem

Detaches event handler fnFunction from the updateSortItem event of this sap.m.P13nSortPanel.

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

sap.m.P13nSortPanel.extend

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

fireAddSortItem

Fires event addSortItem to attached listeners.

fireRemoveSortItem

Fires event removeSortItem to attached listeners.

fireUpdateSortItem

Fires event updateSortItem to attached listeners.

getContainerQuery

Gets current value of property containerQuery.

defines if the mediaQuery or a ContainerResize will be used for layout update. When the ConditionPanel is used on a dialog the property should be set to true!

Default value is false.

getLayoutMode

Gets current value of property layoutMode.

can be used to control the layout behavior. Default is "" which will automatically change the layout. With "Desktop", "Table" or "Phone" you can set a fixed layout.

sap.m.P13nSortPanel.getMetadata

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

getSortItems

Gets content of aggregation sortItems.

defined Sort Items

indexOfSortItem

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

insertSortItem

Inserts a sortItem into the aggregation sortItems.

removeAllSortItems

Removes all the controls from the aggregation sortItems.

Additionally, it unregisters them from the hosting UIArea.

removeInvalidConditions

removes all invalid sort conditions.

removeSortItem

Removes a sortItem from the aggregation sortItems.

removeValidationErrors

removes all errors/warning states from of all sort conditions.

setContainerQuery

Sets a new value for property containerQuery.

defines if the mediaQuery or a ContainerResize will be used for layout update. When the ConditionPanel is used on a dialog the property should be set to true!

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

Default value is false.

setLayoutMode

Sets a new value for property layoutMode.

can be used to control the layout behavior. Default is "" which will automatically change the layout. With "Desktop", "Table" or "Phone" you can set a fixed layout.

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

setOperations

setter for the supported operations array

unbindSortItems

Unbinds aggregation sortItems from model data.

validateConditions

check if the entered/modified conditions are correct, marks invalid fields yellow (Warning state) and opens a popup message dialog to give the user the feedback that some values are wrong or missing.

addSortItem

Adds some sortItem to the aggregation sortItems.

Param Type DefaultValue Description
oSortItem sap.m.P13nSortItem

The sortItem to add; if empty, nothing is inserted

attachAddSortItem

Attaches event handler fnFunction to the addSortItem event of this sap.m.P13nSortPanel.

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

event raised when a SortItem was added

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

attachRemoveSortItem

Attaches event handler fnFunction to the removeSortItem event of this sap.m.P13nSortPanel.

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

event raised when a SortItem was removed

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

attachUpdateSortItem

Attaches event handler fnFunction to the updateSortItem event of this sap.m.P13nSortPanel.

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

event raised when a SortItem was updated

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

bindSortItems

Binds aggregation sortItems 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

destroySortItems

Destroys all the sortItems in the aggregation sortItems.

detachAddSortItem

Detaches event handler fnFunction from the addSortItem event of this sap.m.P13nSortPanel.

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

detachRemoveSortItem

Detaches event handler fnFunction from the removeSortItem event of this sap.m.P13nSortPanel.

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

detachUpdateSortItem

Detaches event handler fnFunction from the updateSortItem event of this sap.m.P13nSortPanel.

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

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

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

sap.m.P13nSortPanel.extend

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

fireAddSortItem

Fires event addSortItem to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireRemoveSortItem

Fires event removeSortItem to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireUpdateSortItem

Fires event updateSortItem to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

getContainerQuery

Gets current value of property containerQuery.

defines if the mediaQuery or a ContainerResize will be used for layout update. When the ConditionPanel is used on a dialog the property should be set to true!

Default value is false.

getLayoutMode

Gets current value of property layoutMode.

can be used to control the layout behavior. Default is "" which will automatically change the layout. With "Desktop", "Table" or "Phone" you can set a fixed layout.

sap.m.P13nSortPanel.getMetadata

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

getSortItems

Gets content of aggregation sortItems.

defined Sort Items

indexOfSortItem

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

Param Type DefaultValue Description
oSortItem sap.m.P13nSortItem

The sortItem whose index is looked for

insertSortItem

Inserts a sortItem into the aggregation sortItems.

Param Type DefaultValue Description
oSortItem sap.m.P13nSortItem

The sortItem to insert; if empty, nothing is inserted

iIndex int

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

removeAllSortItems

Removes all the controls from the aggregation sortItems.

Additionally, it unregisters them from the hosting UIArea.

removeInvalidConditions

removes all invalid sort conditions.

removeSortItem

Removes a sortItem from the aggregation sortItems.

Param Type DefaultValue Description
vSortItem int string sap.m.P13nSortItem

The sortItem to remove or its index or id

removeValidationErrors

removes all errors/warning states from of all sort conditions.

setContainerQuery

Sets a new value for property containerQuery.

defines if the mediaQuery or a ContainerResize will be used for layout update. When the ConditionPanel is used on a dialog the property should be set to true!

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
bContainerQuery boolean false

New value for property containerQuery

setLayoutMode

Sets a new value for property layoutMode.

can be used to control the layout behavior. Default is "" which will automatically change the layout. With "Desktop", "Table" or "Phone" you can set a fixed layout.

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

Param Type DefaultValue Description
sLayoutMode string

New value for property layoutMode

setOperations

setter for the supported operations array

Param Type DefaultValue Description
aOperations array

array of operations [sap.m.P13nConditionOperation.BT, sap.m.P13nConditionOperation.EQ]

unbindSortItems

Unbinds aggregation sortItems from model data.

validateConditions

check if the entered/modified conditions are correct, marks invalid fields yellow (Warning state) and opens a popup message dialog to give the user the feedback that some values are wrong or missing.