Class sap.m.P13nSortPanelModule: sap/m/P13nSortPanel

extends P13nPanel

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

Constructor Summary
new sap.m.P13nSortPanel(sId?, mSettings?)Constructor for a new P13nSortPanel.
Event Summary
addSortItem(oControlEvent)event raised when a SortItem was added
removeSortItem(oControlEvent)remove a sort item
updateSortItem(oControlEvent)update a sort item
Events borrowed from class sap.m.P13nPanel
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.P13nSortPanel.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.P13nSortPanel with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.P13nSortPanel.getMetadata()Returns a metadata object for class sap.m.P13nSortPanel.
addSortItem(oSortItem)Adds some sortItem to the aggregation sortItems.
attachAddSortItem(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the addSortItem event of this sap.m.P13nSortPanel.
attachRemoveSortItem(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the removeSortItem event of this sap.m.P13nSortPanel.
attachUpdateSortItem(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the updateSortItem event of this sap.m.P13nSortPanel.
bindSortItems(oBindingInfo)Binds aggregation sortItems to model data.
destroySortItems()Destroys all the sortItems in the aggregation sortItems.
detachAddSortItem(fnFunction, oListener)Detaches event handler fnFunction from the addSortItem event of this sap.m.P13nSortPanel.
detachRemoveSortItem(fnFunction, oListener)Detaches event handler fnFunction from the removeSortItem event of this sap.m.P13nSortPanel.
detachUpdateSortItem(fnFunction, oListener)Detaches event handler fnFunction from the updateSortItem event of this sap.m.P13nSortPanel.
fireAddSortItem(mArguments?)Fires event addSortItem to attached listeners.
fireRemoveSortItem(mArguments?)Fires event removeSortItem to attached listeners.
fireUpdateSortItem(mArguments?)Fires event updateSortItem to attached listeners.
getContainerQuery()Gets current value of property containerQuery.
getLayoutMode()Gets current value of property layoutMode.
getSortItems()Gets content of aggregation sortItems.
indexOfSortItem(oSortItem)Checks for the provided sap.m.P13nSortItem in the aggregation sortItems.
insertSortItem(oSortItem, iIndex)Inserts a sortItem into the aggregation sortItems.
removeAllSortItems()Removes all the controls from the aggregation sortItems.
removeInvalidConditions()removes all invalid sort conditions.
removeSortItem(vSortItem)Removes a sortItem from the aggregation sortItems.
removeValidationErrors()removes all errors/warning states from of all sort conditions.
setContainerQuery(bContainerQuery)Sets a new value for property containerQuery.
setLayoutMode(sLayoutMode)Sets a new value for property layoutMode.
setOperations(array)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.
Constructor Detail
new sap.m.P13nSortPanel(sId?, mSettings?)
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 for a general description of the syntax of the settings object.

The supported settings are:

  • Properties
  • Aggregations
  • Events
    • addSortItem : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • removeSortItem : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • updateSortItem : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

In addition, all settings applicable to the base type sap.m.P13nPanel can be used as well.

Parameters:
{string}sId? id for the new control, generated automatically if no id is given
{object}mSettings? initial settings for the new control
Event Detail
addSortItem(oControlEvent)
event raised when a SortItem was added
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Since:
1.26
removeSortItem(oControlEvent)
remove a sort item
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Since:
1.26
updateSortItem(oControlEvent)
update a sort item
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
Since:
1.26
Method Detail
sap.m.P13nSortPanel.extend(sClassName, oClassInfo?, FNMetaImpl?): function
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.

Parameters:
{string}sClassName Name of the class being created
{object}oClassInfo? Object literal with information about the class
{function}FNMetaImpl? Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
{function} Created class / constructor function
sap.m.P13nSortPanel.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.P13nSortPanel.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addSortItem(oSortItem): sap.m.P13nSortPanel
Adds some sortItem to the aggregation sortItems.
Parameters:
{sap.m.P13nSortItem}oSortItem the sortItem to add; if empty, nothing is inserted
Since:
1.26
Returns:
{sap.m.P13nSortPanel} Reference to this in order to allow method chaining
attachAddSortItem(oData?, fnFunction, oListener?): sap.m.P13nSortPanel
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

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.P13nSortPanel itself
Since:
1.26
Returns:
{sap.m.P13nSortPanel} Reference to this in order to allow method chaining
attachRemoveSortItem(oData?, fnFunction, oListener?): sap.m.P13nSortPanel
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.

remove a sort item

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.P13nSortPanel itself
Since:
1.26
Returns:
{sap.m.P13nSortPanel} Reference to this in order to allow method chaining
attachUpdateSortItem(oData?, fnFunction, oListener?): sap.m.P13nSortPanel
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.

update a sort item

Parameters:
{object}oData? An application-specific payload object that will be passed to the event handler along with the event object when firing the event
{function}fnFunction The function to be called when the event occurs
{object}oListener? Context object to call the event handler with. Defaults to this sap.m.P13nSortPanel itself
Since:
1.26
Returns:
{sap.m.P13nSortPanel} Reference to this in order to allow method chaining
bindSortItems(oBindingInfo): sap.m.P13nSortPanel
Binds aggregation sortItems to model data.

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

Parameters:
{object}oBindingInfo The binding information
Since:
1.26
Returns:
{sap.m.P13nSortPanel} Reference to this in order to allow method chaining
destroySortItems(): sap.m.P13nSortPanel
Destroys all the sortItems in the aggregation sortItems.
Since:
1.26
Returns:
{sap.m.P13nSortPanel} Reference to this in order to allow method chaining
detachAddSortItem(fnFunction, oListener): sap.m.P13nSortPanel
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.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Since:
1.26
Returns:
{sap.m.P13nSortPanel} Reference to this in order to allow method chaining
detachRemoveSortItem(fnFunction, oListener): sap.m.P13nSortPanel
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.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Since:
1.26
Returns:
{sap.m.P13nSortPanel} Reference to this in order to allow method chaining
detachUpdateSortItem(fnFunction, oListener): sap.m.P13nSortPanel
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.

Parameters:
{function}fnFunction The function to be called, when the event occurs
{object}oListener Context object on which the given function had to be called
Since:
1.26
Returns:
{sap.m.P13nSortPanel} Reference to this in order to allow method chaining
fireAddSortItem(mArguments?): sap.m.P13nSortPanel
Fires event addSortItem to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.26
Returns:
{sap.m.P13nSortPanel} Reference to this in order to allow method chaining
fireRemoveSortItem(mArguments?): sap.m.P13nSortPanel
Fires event removeSortItem to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.26
Returns:
{sap.m.P13nSortPanel} Reference to this in order to allow method chaining
fireUpdateSortItem(mArguments?): sap.m.P13nSortPanel
Fires event updateSortItem to attached listeners.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Since:
1.26
Returns:
{sap.m.P13nSortPanel} Reference to this in order to allow method chaining
getContainerQuery(): boolean
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.

Since:
1.26
Returns:
{boolean} Value of property containerQuery
getLayoutMode(): string
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.

Since:
1.26
Returns:
{string} Value of property layoutMode
getSortItems(): sap.m.P13nSortItem[]
Gets content of aggregation sortItems.

defined Sort Items

Since:
1.26
Returns:
{sap.m.P13nSortItem[]}
indexOfSortItem(oSortItem): int
Checks for the provided sap.m.P13nSortItem in the aggregation sortItems. and returns its index if found or -1 otherwise.
Parameters:
{sap.m.P13nSortItem}oSortItem The sortItem whose index is looked for
Since:
1.26
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertSortItem(oSortItem, iIndex): sap.m.P13nSortPanel
Inserts a sortItem into the aggregation sortItems.
Parameters:
{sap.m.P13nSortItem}oSortItem the sortItem to insert; if empty, nothing is inserted
{int}iIndex 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
Since:
1.26
Returns:
{sap.m.P13nSortPanel} Reference to this in order to allow method chaining
removeAllSortItems(): sap.m.P13nSortItem[]
Removes all the controls from the aggregation sortItems.

Additionally, it unregisters them from the hosting UIArea.

Since:
1.26
Returns:
{sap.m.P13nSortItem[]} An array of the removed elements (might be empty)
removeInvalidConditions()
removes all invalid sort conditions.
Since:
1.28
removeSortItem(vSortItem): sap.m.P13nSortItem
Removes a sortItem from the aggregation sortItems.
Parameters:
{int|string|sap.m.P13nSortItem}vSortItem The sortItemto remove or its index or id
Since:
1.26
Returns:
{sap.m.P13nSortItem} The removed sortItem or null
removeValidationErrors()
removes all errors/warning states from of all sort conditions.
Since:
1.28
setContainerQuery(bContainerQuery): sap.m.P13nSortPanel
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.

Parameters:
{boolean}bContainerQuery New value for property containerQuery
Since:
1.26
Returns:
{sap.m.P13nSortPanel} Reference to this in order to allow method chaining
setLayoutMode(sLayoutMode): sap.m.P13nSortPanel
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.

Parameters:
{string}sLayoutMode New value for property layoutMode
Since:
1.26
Returns:
{sap.m.P13nSortPanel} Reference to this in order to allow method chaining
setOperations(array)
setter for the supported operations array
Parameters:
{array}array of operations [sap.m.P13nConditionOperation.BT, sap.m.P13nConditionOperation.EQ]
Since:
1.26
unbindSortItems(): sap.m.P13nSortPanel
Unbinds aggregation sortItems from model data.
Since:
1.26
Returns:
{sap.m.P13nSortPanel} Reference to this in order to allow method chaining
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.
Since:
1.26