class sap.ui.commons.RowRepeater

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/commons/RowRepeater
Application Component: CA-UI5-CTR

This control displays items in a stacked list format, allowing the user to page in order to see more items or to use the offered filtering and sorting capabilities in order to manipulate the displayed data.


Constructor

Constructor for a new RowRepeater.

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.commons.RowRepeater(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
currentPage int 1

The index of the page currently displayed. The index starts at 1.

Visibility: public
design sap.ui.commons.RowRepeaterDesign Standard

The visual design of the control.

Visibility: public
fixedRowHeight sap.ui.core.CSSSize empty string

Row height adapts to rendered content. If a fixed height is specified the cells have a maximum height and the overflow will be hidden.

Visibility: public
numberOfRows int 5

Number of rows displayed.

Visibility: public
showMoreSteps int 0

Step size used to increase the numberOfRows value. This feature is only active if value is greater than 0. This will deactivate the paging feature.

Visibility: public
threshold int

Threshold to fetch the next chunk of data. The minimal threshold can be the numberOfRows of the RR.

Visibility: public

Aggregations

Default Aggregation: rows

Name Cardinality Type Description
filterToolbar 0..1 sap.ui.commons.Toolbar

A Toolbar which used internally by the RowRepeater

filters 0..n sap.ui.commons.RowRepeaterFilter

Filters to be provided in toolbar.

footerPager 0..1 sap.ui.commons.Paginator

A Paginator which used internally by the RowRepeater

footerShowMoreButton 0..1 sap.ui.commons.Button

A Button which used internally by the RowRepeater

headerShowMoreButton 0..1 sap.ui.commons.Button

A Button which used internally by the RowRepeater

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

This control is shown, in case there is no data available to be displayed in the RowRepeater.

rows (default) 0..n sap.ui.core.Control

Rows to be repeated.

sorterToolbar 0..1 sap.ui.commons.Toolbar

A Toolbar which used internally by the RowRepeater

sorters 0..n sap.ui.commons.RowRepeaterSorter

Sorters to be provided in secondary toolbar.

title 0..1 sap.ui.core.Title

Title to be displayed in top left corner. Either text or icon.


Events Overview

Event Description
filter

This event is triggered when a filter is set.

page

This event is triggered when paging was executed.

resize

This event is triggered when the number of rows was changed.

sort

This event is triggered when a sorting is applied.

filter

This event is triggered when a filter is set.

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

The ID of the filter that has just been applied.

page

This event is triggered when paging was executed.

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

The value of the currentPage property after the change.

previousPage int

The value of the currentPage property before the change.

resize

This event is triggered when the number of rows was changed.

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

The value of the numberOfRows property after the change.

previousNumberOfRows int

The value of the numberOfRows property before the change.

sort

This event is triggered when a sorting is applied.

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

The ID of the sorter that has just been applied.


Methods Overview

Method Description
addFilter

Adds some filter to the aggregation filters.

addRow

Adds some row to the aggregation rows.

addSorter

Adds some sorter to the aggregation sorters.

applyFilter

Applies a filter.

attachFilter

Attaches event handler fnFunction to the filter event of this sap.ui.commons.RowRepeater.

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.commons.RowRepeater itself.

This event is triggered when a filter is set.

attachPage

Attaches event handler fnFunction to the page event of this sap.ui.commons.RowRepeater.

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.commons.RowRepeater itself.

This event is triggered when paging was executed.

attachResize

Attaches event handler fnFunction to the resize event of this sap.ui.commons.RowRepeater.

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.commons.RowRepeater itself.

This event is triggered when the number of rows was changed.

attachSort

Attaches event handler fnFunction to the sort event of this sap.ui.commons.RowRepeater.

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.commons.RowRepeater itself.

This event is triggered when a sorting is applied.

bindRows

Binds aggregation rows to model data.

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

destroyFilters

Destroys all the filters in the aggregation filters.

destroyNoData

Destroys the noData in the aggregation noData.

destroyRows

Destroys all the rows in the aggregation rows.

destroySorters

Destroys all the sorters in the aggregation sorters.

destroyTitle

Destroys the title in the aggregation title.

detachFilter

Detaches event handler fnFunction from the filter event of this sap.ui.commons.RowRepeater.

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

detachPage

Detaches event handler fnFunction from the page event of this sap.ui.commons.RowRepeater.

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

detachResize

Detaches event handler fnFunction from the resize event of this sap.ui.commons.RowRepeater.

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

detachSort

Detaches event handler fnFunction from the sort event of this sap.ui.commons.RowRepeater.

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

sap.ui.commons.RowRepeater.extend

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

oClassInfo might contain the same kind of information as described in sap.ui.core.Control.extend.

fireFilter

Fires event filter to attached listeners.

firePage

Fires event page to attached listeners.

fireResize

Fires event resize to attached listeners.

fireSort

Fires event sort to attached listeners.

firstPage

Switch to first page.

getCurrentPage

Gets current value of property currentPage.

The index of the page currently displayed. The index starts at 1.

Default value is 1.

getDesign

Gets current value of property design.

The visual design of the control.

Default value is Standard.

getFilters

Gets content of aggregation filters.

Filters to be provided in toolbar.

getFixedRowHeight

Gets current value of property fixedRowHeight.

Row height adapts to rendered content. If a fixed height is specified the cells have a maximum height and the overflow will be hidden.

Default value is empty string.

sap.ui.commons.RowRepeater.getMetadata

Returns a metadata object for class sap.ui.commons.RowRepeater.

getNoData

Gets content of aggregation noData.

This control is shown, in case there is no data available to be displayed in the RowRepeater.

getNumberOfRows

Gets current value of property numberOfRows.

Number of rows displayed.

Default value is 5.

getRows

Gets content of aggregation rows.

Rows to be repeated.

getShowMoreSteps

Gets current value of property showMoreSteps.

Step size used to increase the numberOfRows value. This feature is only active if value is greater than 0. This will deactivate the paging feature.

Default value is 0.

getSorters

Gets content of aggregation sorters.

Sorters to be provided in secondary toolbar.

getThreshold

Gets current value of property threshold.

Threshold to fetch the next chunk of data. The minimal threshold can be the numberOfRows of the RR.

getTitle

Gets content of aggregation title.

Title to be displayed in top left corner. Either text or icon.

gotoPage

Switch to specified page.

indexOfFilter

Checks for the provided sap.ui.commons.RowRepeaterFilter in the aggregation filters. and returns its index if found or -1 otherwise.

indexOfRow

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

indexOfSorter

Checks for the provided sap.ui.commons.RowRepeaterSorter in the aggregation sorters. and returns its index if found or -1 otherwise.

insertFilter

Inserts a filter into the aggregation filters.

insertRow

Inserts a row into the aggregation rows.

insertSorter

Inserts a sorter into the aggregation sorters.

lastPage

Switch to last page.

nextPage

Switch to next page.

previousPage

Switch to previous page.

removeAllFilters

Removes all the controls from the aggregation filters.

Additionally, it unregisters them from the hosting UIArea.

removeAllRows

Removes all the controls from the aggregation rows.

Additionally, it unregisters them from the hosting UIArea.

removeAllSorters

Removes all the controls from the aggregation sorters.

Additionally, it unregisters them from the hosting UIArea.

removeFilter

Removes a filter from the aggregation filters.

removeRow

Removes a row from the aggregation rows.

removeSorter

Removes a sorter from the aggregation sorters.

resize

Resizes the row repeater by changing the number of displayed rows. This method will only resize the RowRepeater if the property showMoreSteps is set.

setCurrentPage

Setter for property currentPage.

setDesign

Sets a new value for property design.

The visual design of the control.

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

Default value is Standard.

setFixedRowHeight

Sets a new value for property fixedRowHeight.

Row height adapts to rendered content. If a fixed height is specified the cells have a maximum height and the overflow will be hidden.

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

Default value is empty string.

setNoData

Sets the aggregated noData.

setNumberOfRows

Setter for property numberOfRows.

Default value is 5

setShowMoreSteps

Override the default behavior of setShowMoreSteps to update the paging mode flag. Any change to the paging mode flag will result in the current page being set to the first page.

setThreshold

Sets a new value for property threshold.

Threshold to fetch the next chunk of data. The minimal threshold can be the numberOfRows of the RR.

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

setTitle

Sets the aggregated title.

triggerShowMore

The triggerShowMore function increments the number of rows by the value of showMoreSteps.

This method will only trigger a showMore if the property showMoreSteps is set.

triggerSort

Sort the data.

unbindRows

Unbinds aggregation rows from model data.

addFilter

Adds some filter to the aggregation filters.

Param Type DefaultValue Description
oFilter sap.ui.commons.RowRepeaterFilter

The filter to add; if empty, nothing is inserted

addRow

Adds some row to the aggregation rows.

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

The row to add; if empty, nothing is inserted

addSorter

Adds some sorter to the aggregation sorters.

Param Type DefaultValue Description
oSorter sap.ui.commons.RowRepeaterSorter

The sorter to add; if empty, nothing is inserted

applyFilter

Applies a filter.

Param Type DefaultValue Description
sId string

The ID if the filter.

attachFilter

Attaches event handler fnFunction to the filter event of this sap.ui.commons.RowRepeater.

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.commons.RowRepeater itself.

This event is triggered when a filter is set.

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.commons.RowRepeater itself

attachPage

Attaches event handler fnFunction to the page event of this sap.ui.commons.RowRepeater.

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.commons.RowRepeater itself.

This event is triggered when paging was executed.

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.commons.RowRepeater itself

attachResize

Attaches event handler fnFunction to the resize event of this sap.ui.commons.RowRepeater.

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.commons.RowRepeater itself.

This event is triggered when the number of rows was 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.commons.RowRepeater itself

attachSort

Attaches event handler fnFunction to the sort event of this sap.ui.commons.RowRepeater.

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.commons.RowRepeater itself.

This event is triggered when a sorting is 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.commons.RowRepeater itself

bindRows

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

destroyFilters

Destroys all the filters in the aggregation filters.

destroyNoData

Destroys the noData in the aggregation noData.

destroyRows

Destroys all the rows in the aggregation rows.

destroySorters

Destroys all the sorters in the aggregation sorters.

destroyTitle

Destroys the title in the aggregation title.

detachFilter

Detaches event handler fnFunction from the filter event of this sap.ui.commons.RowRepeater.

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

detachPage

Detaches event handler fnFunction from the page event of this sap.ui.commons.RowRepeater.

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

detachResize

Detaches event handler fnFunction from the resize event of this sap.ui.commons.RowRepeater.

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

detachSort

Detaches event handler fnFunction from the sort event of this sap.ui.commons.RowRepeater.

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

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

The function to be called, when the event occurs

oListener object

Context object on which the given function had to be called

sap.ui.commons.RowRepeater.extend

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

oClassInfo might contain the same kind of information as described in sap.ui.core.Control.extend.

Param Type DefaultValue Description
sClassName string

Name of the class being created

oClassInfo object

Object literal with information about the class

FNMetaImpl function

Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class

fireFilter

Fires event filter to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

filterId string

The ID of the filter that has just been applied.

firePage

Fires event page to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

currentPage int

The value of the currentPage property after the change.

previousPage int

The value of the currentPage property before the change.

fireResize

Fires event resize to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

numberOfRows int

The value of the numberOfRows property after the change.

previousNumberOfRows int

The value of the numberOfRows property before the change.

fireSort

Fires event sort to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

sorterId string

The ID of the sorter that has just been applied.

firstPage

Switch to first page.

getCurrentPage

Gets current value of property currentPage.

The index of the page currently displayed. The index starts at 1.

Default value is 1.

getDesign

Gets current value of property design.

The visual design of the control.

Default value is Standard.

getFilters

Gets content of aggregation filters.

Filters to be provided in toolbar.

getFixedRowHeight

Gets current value of property fixedRowHeight.

Row height adapts to rendered content. If a fixed height is specified the cells have a maximum height and the overflow will be hidden.

Default value is empty string.

sap.ui.commons.RowRepeater.getMetadata

Returns a metadata object for class sap.ui.commons.RowRepeater.

getNoData

Gets content of aggregation noData.

This control is shown, in case there is no data available to be displayed in the RowRepeater.

getNumberOfRows

Gets current value of property numberOfRows.

Number of rows displayed.

Default value is 5.

getRows

Gets content of aggregation rows.

Rows to be repeated.

getShowMoreSteps

Gets current value of property showMoreSteps.

Step size used to increase the numberOfRows value. This feature is only active if value is greater than 0. This will deactivate the paging feature.

Default value is 0.

getSorters

Gets content of aggregation sorters.

Sorters to be provided in secondary toolbar.

getThreshold

Gets current value of property threshold.

Threshold to fetch the next chunk of data. The minimal threshold can be the numberOfRows of the RR.

getTitle

Gets content of aggregation title.

Title to be displayed in top left corner. Either text or icon.

gotoPage

Switch to specified page.

Param Type DefaultValue Description
iPageNumber int

The index of the page to go to.

indexOfFilter

Checks for the provided sap.ui.commons.RowRepeaterFilter in the aggregation filters. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oFilter sap.ui.commons.RowRepeaterFilter

The filter whose index is looked for

indexOfRow

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

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

The row whose index is looked for

indexOfSorter

Checks for the provided sap.ui.commons.RowRepeaterSorter in the aggregation sorters. and returns its index if found or -1 otherwise.

Param Type DefaultValue Description
oSorter sap.ui.commons.RowRepeaterSorter

The sorter whose index is looked for

insertFilter

Inserts a filter into the aggregation filters.

Param Type DefaultValue Description
oFilter sap.ui.commons.RowRepeaterFilter

The filter to insert; if empty, nothing is inserted

iIndex int

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

insertRow

Inserts a row into the aggregation rows.

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

The row to insert; if empty, nothing is inserted

iIndex int

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

insertSorter

Inserts a sorter into the aggregation sorters.

Param Type DefaultValue Description
oSorter sap.ui.commons.RowRepeaterSorter

The sorter to insert; if empty, nothing is inserted

iIndex int

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

lastPage

Switch to last page.

nextPage

Switch to next page.

previousPage

Switch to previous page.

removeAllFilters

Removes all the controls from the aggregation filters.

Additionally, it unregisters them from the hosting UIArea.

removeAllRows

Removes all the controls from the aggregation rows.

Additionally, it unregisters them from the hosting UIArea.

removeAllSorters

Removes all the controls from the aggregation sorters.

Additionally, it unregisters them from the hosting UIArea.

removeFilter

Removes a filter from the aggregation filters.

Param Type DefaultValue Description
vFilter int string sap.ui.commons.RowRepeaterFilter

The filter to remove or its index or id

removeRow

Removes a row from the aggregation rows.

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

The row to remove or its index or id

removeSorter

Removes a sorter from the aggregation sorters.

Param Type DefaultValue Description
vSorter int string sap.ui.commons.RowRepeaterSorter

The sorter to remove or its index or id

resize

Resizes the row repeater by changing the number of displayed rows. This method will only resize the RowRepeater if the property showMoreSteps is set.

Param Type DefaultValue Description
iNumberOfRows int

The new value of number of rows displayed.

setCurrentPage

Setter for property currentPage.

Param Type DefaultValue Description
iCurrentPage int

new value for property currentPage

setDesign

Sets a new value for property design.

The visual design of the control.

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

Default value is Standard.

Param Type DefaultValue Description
sDesign sap.ui.commons.RowRepeaterDesign Standard

New value for property design

setFixedRowHeight

Sets a new value for property fixedRowHeight.

Row height adapts to rendered content. If a fixed height is specified the cells have a maximum height and the overflow will be hidden.

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

Default value is empty string.

Param Type DefaultValue Description
sFixedRowHeight sap.ui.core.CSSSize ''

New value for property fixedRowHeight

setNoData

Sets the aggregated noData.

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

The noData to set

setNumberOfRows

Setter for property numberOfRows.

Default value is 5

Param Type DefaultValue Description
iNumberOfRows int

new value for property numberOfRows

setShowMoreSteps

Override the default behavior of setShowMoreSteps to update the paging mode flag. Any change to the paging mode flag will result in the current page being set to the first page.

Param Type DefaultValue Description
iShowMoreSteps int

new value for property showMoreSteps

setThreshold

Sets a new value for property threshold.

Threshold to fetch the next chunk of data. The minimal threshold can be the numberOfRows of the RR.

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

Param Type DefaultValue Description
iThreshold int

New value for property threshold

setTitle

Sets the aggregated title.

Param Type DefaultValue Description
oTitle sap.ui.core.Title

The title to set

triggerShowMore

The triggerShowMore function increments the number of rows by the value of showMoreSteps.

This method will only trigger a showMore if the property showMoreSteps is set.

triggerSort

Sort the data.

Param Type DefaultValue Description
sId string

The ID of the sorter.

unbindRows

Unbinds aggregation rows from model data.