Class sap.suite.ui.commons.ViewRepeaterModule: sap/suite/ui/commons/ViewRepeater
This control extends the sap.ui.commons.RowRepeater control providing an ability to change data representation by switching between a number of views. The data can be displayed not only in rows but also in tiles that are adjusted to fill the entire horizontal space in a row.
Deprecated API:Since version 1.32. Deprecated. Standard Fiori technology should be used.
sClassName
and enriches it with the information contained in oClassInfo
.fnFunction
to the 'changeView' event of this sap.suite.ui.commons.ViewRepeater
.fnFunction
to the 'search' event of this sap.suite.ui.commons.ViewRepeater
.fnFunction
from the 'changeView' event of this sap.suite.ui.commons.ViewRepeater
.fnFunction
from the 'search' event of this sap.suite.ui.commons.ViewRepeater
.sap.suite.ui.commons.RepeaterViewConfiguration
in the aggregation named views
and returns its index if found or -1 otherwise. Accepts an object literal mSettings
that defines initial property values, aggregated and associated objects as well as event handlers.
If the name of a setting is ambiguous (e.g. a property has the same name as an event), then the framework assumes property, aggregation, association, event in that order. To override this automatic resolution, one of the prefixes "aggregation:", "association:" or "event:" can be added to the name of the setting (such a prefixed name must be enclosed in single or double quotes).
The supported settings are:
- Properties
- itemMinWidth : int
- responsive : boolean (default: false)
- defaultViewIndex : int (default: 0)
- showSearchField : boolean (default: true)
- showViews : boolean (default: true)
- external : boolean (default: false)
- itemHeight : int
- height : sap.ui.core.CSSSize (default: '100%')
- Aggregations
- views : sap.suite.ui.commons.RepeaterViewConfiguration[]
- Associations
- externalRepresentation : string | sap.ui.core.Control
- Events
- search : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
- changeView : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
In addition, all settings applicable to the base type sap.ui.commons.RowRepeater can be used as well.
{string} | sId? | id for the new control, generated automatically if no id is given |
{object} | mSettings? | initial settings for the new control |
- Deprecated:
- Since version 1.32. Deprecated. Standard Fiori technology should be used.
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters | |
{int} | oControlEvent.getParameters.oldViewIndex | Contains an index of the previous view in the Views aggregation. |
{int} | oControlEvent.getParameters.newViewIndex | Contains an index of the new view in the Views aggregation. |
{string} | oControlEvent.getParameters.filterId | Contains an ID of the filter in the Filters aggregation. |
{string} | oControlEvent.getParameters.sorterId | Contains an ID of the sorter in the Sorters aggregation. |
{int} | oControlEvent.getParameters.page | Contains a page number. |
{sap.ui.base.Event} | oControlEvent | |
{sap.ui.base.EventProvider} | oControlEvent.getSource | |
{object} | oControlEvent.getParameters | |
{string} | oControlEvent.getParameters.query | The search query. |
sClassName
and enriches it with the information contained in oClassInfo
. oClassInfo
might contain the same kind of informations as described in Element.extend.
{string} | sClassName | name of the class to be created |
{object} | oClassInfo? | object literal with informations about the class |
{function} | FNMetaImpl? | constructor function for the metadata object. If not given, it defaults to sap.ui.core.ElementMetadata. |
{function} | the created class / constructor function |
{sap.ui.base.Metadata} | Metadata object describing this class |
oView
to the aggregation named views
. {sap.suite.ui.commons.RepeaterViewConfiguration} | oView | the view to add; if empty, nothing is inserted |
{sap.suite.ui.commons.ViewRepeater} | this to allow method chaining |
fnFunction
to the 'changeView' event of this sap.suite.ui.commons.ViewRepeater
.. When called, the context of the event handler (its
this
) will be bound to oListener if specified otherwise to this sap.suite.ui.commons.ViewRepeater
.
itself. This event is fired when a user switches between views.
{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 call, when the event occurs. |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.suite.ui.commons.ViewRepeater .itself. |
{sap.suite.ui.commons.ViewRepeater} | this to allow method chaining |
fnFunction
to the 'search' event of this sap.suite.ui.commons.ViewRepeater
.. When called, the context of the event handler (its
this
) will be bound to oListener if specified otherwise to this sap.suite.ui.commons.ViewRepeater
.
itself. This event is fired when the user performs a search.
{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 call, when the event occurs. |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.suite.ui.commons.ViewRepeater .itself. |
{sap.suite.ui.commons.ViewRepeater} | this to allow method chaining |
views
. {sap.suite.ui.commons.ViewRepeater} | this to allow method chaining |
fnFunction
from the 'changeView' event of this sap.suite.ui.commons.ViewRepeater
.The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to call, when the event occurs. |
{object} | oListener | Context object on which the given function had to be called. |
{sap.suite.ui.commons.ViewRepeater} | this to allow method chaining |
fnFunction
from the 'search' event of this sap.suite.ui.commons.ViewRepeater
.The passed function and listener object must match the ones used for event registration.
{function} | fnFunction | The function to call, when the event occurs. |
{object} | oListener | Context object on which the given function had to be called. |
{sap.suite.ui.commons.ViewRepeater} | this to allow method chaining |
Expects following event parameters:
- 'oldViewIndex' of type
int
Contains an index of the previous view in the Views aggregation. - 'newViewIndex' of type
int
Contains an index of the new view in the Views aggregation. - 'filterId' of type
string
Contains an ID of the filter in the Filters aggregation. - 'sorterId' of type
string
Contains an ID of the sorter in the Sorters aggregation. - 'page' of type
int
Contains a page number.
{Map} | mArguments? | the arguments to pass along with the event. |
{sap.suite.ui.commons.ViewRepeater} | this to allow method chaining |
Expects following event parameters:
- 'query' of type
string
The search query.
{Map} | mArguments? | the arguments to pass along with the event. |
{sap.suite.ui.commons.ViewRepeater} | this to allow method chaining |
defaultViewIndex
. The index of the default view starting from 0. The view is selected on the initial rendering of the control. If the index is greater than the total quantity of the views, the last view is selected. Default value is 0
{int} | the value of property defaultViewIndex |
external
. Indicates if the external representation of the current view is rendered. Default value is false
{boolean} | the value of property external |
{string} | Id of the element which is the current target of the externalRepresentation association, or null |
height
. The height of the control. Only applicable if the responsive property is set to true. Default value is 100%
{sap.ui.core.CSSSize} | the value of property height |
itemHeight
. The height of the tile in the current view in pixels. Only applicable if the responsive property is set to true. This value is used for calculating the number of tile rows. Default value is empty/undefined
{int} | the value of property itemHeight |
itemMinWidth
. The minimal width of the tile for the current view. Only applicable if "responsive" property is set to true. Default value is empty/undefined
{int} | the value of property itemMinWidth |
responsive
. This parameter indicates whether the content is shown in rows or tiles. If false, the content is shown in rows just like in core sap.ui.commons.RowRepeater. If true, the content is shown in tiles (similar to sap.ui.ux3.DataSet control) that have minimal width defined by the "itemMinWidth" property. The number of columns depends on the parent control's width. If you resize the control, the number of columns may change respectively so that the content tiles can fill the entire space of a row. Default value is false
{boolean} | the value of property responsive |
showSearchField
. Indicates if the search field panel is shown. Default value is true
{boolean} | the value of property showSearchField |
showViews
. Indicates if the view selector panel is shown. Default value is true
{boolean} | the value of property showViews |
views
.The list of views for the data representation.
{sap.suite.ui.commons.RepeaterViewConfiguration[]} |
sap.suite.ui.commons.RepeaterViewConfiguration
in the aggregation named views
and returns its index if found or -1 otherwise. {sap.suite.ui.commons.RepeaterViewConfiguration} | oView | the view whose index is looked for. |
{int} | the index of the provided control in the aggregation if found, or -1 otherwise |
views
. {sap.suite.ui.commons.RepeaterViewConfiguration} | oView | the view to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the view should be inserted at; for a negative value of iIndex , the view is inserted at position 0; for a value greater than the current size of the aggregation, the view is inserted at the last position |
{sap.suite.ui.commons.ViewRepeater} | this to allow method chaining |
views
.Additionally unregisters them from the hosting UIArea.
{sap.suite.ui.commons.RepeaterViewConfiguration[]} | an array of the removed elements (might be empty) |
views
. {int|string|sap.suite.ui.commons.RepeaterViewConfiguration} | vView | the view to remove or its index or id |
{sap.suite.ui.commons.RepeaterViewConfiguration} | the removed view or null |
defaultViewIndex
. Default value is 0
{int} | iDefaultViewIndex | new value for property defaultViewIndex |
{sap.suite.ui.commons.ViewRepeater} | this to allow method chaining |
external
. Default value is false
{boolean} | bExternal | new value for property external |
{sap.suite.ui.commons.ViewRepeater} | this to allow method chaining |
{string|sap.ui.core.Control} | vExternalRepresentation | Id of an element which becomes the new target of this externalRepresentation association. Alternatively, an element instance may be given. |
{sap.suite.ui.commons.ViewRepeater} | this to allow method chaining |
height
. Default value is 100%
{sap.ui.core.CSSSize} | sHeight | new value for property height |
{sap.suite.ui.commons.ViewRepeater} | this to allow method chaining |
itemHeight
. Default value is empty/undefined
{int} | iItemHeight | new value for property itemHeight |
{sap.suite.ui.commons.ViewRepeater} | this to allow method chaining |
itemMinWidth
. Default value is empty/undefined
{int} | iItemMinWidth | new value for property itemMinWidth |
{sap.suite.ui.commons.ViewRepeater} | this to allow method chaining |
responsive
. Default value is false
{boolean} | bResponsive | new value for property responsive |
{sap.suite.ui.commons.ViewRepeater} | this to allow method chaining |
showSearchField
. Default value is true
{boolean} | bShowSearchField | new value for property showSearchField |
{sap.suite.ui.commons.ViewRepeater} | this to allow method chaining |
showViews
. Default value is true
{boolean} | bShowViews | new value for property showViews |
{sap.suite.ui.commons.ViewRepeater} | this to allow method chaining |