Class sap.m.QuickViewBaseModule: sap/m/QuickViewBase

extends Control
known direct subclasses: QuickView, QuickViewCard

QuickViewBase class provides base functionality for QuickView and QuickViewCard. Do not use it directly.


Since: 1.28.11.
Constructor Summary
new sap.m.QuickViewBase(sId?, mSettings?)Constructor for a new QuickViewBase.
Event Summary
afterNavigate(oControlEvent)The event is fired when navigation between two pages has completed.
navigate(oControlEvent)The event is fired when navigation between two pages has been triggered.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.QuickViewBase.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.QuickViewBase with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.QuickViewBase.getMetadata()Returns a metadata object for class sap.m.QuickViewBase.
addPage(oPage)Adds some page to the aggregation pages.
attachAfterNavigate(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the afterNavigate event of this sap.m.QuickViewBase.
attachNavigate(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the navigate event of this sap.m.QuickViewBase.
bindPages(oBindingInfo)Binds aggregation pages to model data.
destroyPages()Destroys all the pages in the aggregation pages.
detachAfterNavigate(fnFunction, oListener)Detaches event handler fnFunction from the afterNavigate event of this sap.m.QuickViewBase.
detachNavigate(fnFunction, oListener)Detaches event handler fnFunction from the navigate event of this sap.m.QuickViewBase.
fireAfterNavigate(mArguments?)Fires event afterNavigate to attached listeners.
fireNavigate(mArguments?)Fires event navigate to attached listeners.
getPages()Gets content of aggregation pages.
indexOfPage(oPage)Checks for the provided sap.m.QuickViewPage in the aggregation pages.
insertPage(oPage, iIndex)Inserts a page into the aggregation pages.
navigateBack()Navigates to the previous page if there is such.
removeAllPages()Removes all the controls from the aggregation pages.
removePage(vPage)Removes a page from the aggregation pages.
unbindPages()Unbinds aggregation pages from model data.
Constructor Detail
new sap.m.QuickViewBase(sId?, mSettings?)
Constructor for a new QuickViewBase.

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:

  • Aggregations
    • pages : sap.m.QuickViewPage[] (default)
  • Events
    • navigate : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • afterNavigate : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

In addition, all settings applicable to the base type sap.ui.core.Control 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
afterNavigate(oControlEvent)
The event is fired when navigation between two pages has completed. In case of animated transitions this event is fired with some delay after the "navigate" event.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{sap.ui.core.Control}oControlEvent.getParameters.from Determines the page, which has been displayed before navigation.
{string}oControlEvent.getParameters.fromId Determines the ID of the page, which has been displayed before navigation.
{sap.ui.core.Control}oControlEvent.getParameters.to Determines the page, which is now displayed after navigation.
{string}oControlEvent.getParameters.toId Determines the ID of the page, which is now displayed after navigation.
{boolean}oControlEvent.getParameters.firstTime Determines whether the "to" page (a control with the ID of the page, which has been navigated to) has not been displayed/navigated to before.
{boolean}oControlEvent.getParameters.isTo Determines whether this was a forward navigation.
{boolean}oControlEvent.getParameters.isBack Determines whether this was a back navigation.
{boolean}oControlEvent.getParameters.isBackToTop Determines whether this was a navigation to the root page.
{boolean}oControlEvent.getParameters.isBackToPage Determines whether this was a navigation to a specific page.
{string}oControlEvent.getParameters.direction Determines how the navigation was triggered, possible values are "to", "back", "backToPage", and "backToTop".
{boolean}oControlEvent.getParameters.isTopPage Determines whether this is a navigation to the top page.
navigate(oControlEvent)
The event is fired when navigation between two pages has been triggered. The transition (if any) to the new page has not started yet. This event can be aborted by the application with preventDefault(), which means that there will be no navigation.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{sap.ui.core.Control}oControlEvent.getParameters.from The page which was displayed before the current navigation.
{string}oControlEvent.getParameters.fromId The ID of the page which was displayed before the current navigation.
{sap.ui.core.Control}oControlEvent.getParameters.to The page which will be displayed after the current navigation.
{string}oControlEvent.getParameters.toId The ID of the page which will be displayed after the current navigation.
{boolean}oControlEvent.getParameters.firstTime Determines whether the "to" page (a control with the ID of the page which is currently navigated to) has not been displayed/navigated to before.
{boolean}oControlEvent.getParameters.isTo Determines whether this is a forward navigation.
{boolean}oControlEvent.getParameters.isBack Determines whether this is a back navigation.
{boolean}oControlEvent.getParameters.isBackToTop Determines whether this is a navigation to the root page.
{boolean}oControlEvent.getParameters.isBackToPage Determines whether this was a navigation to a specific page.
{string}oControlEvent.getParameters.direction Determines how the navigation was triggered, possible values are "to", "back", "backToPage", and "backToTop".
Method Detail
sap.m.QuickViewBase.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.QuickViewBase 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.

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.QuickViewBase.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.QuickViewBase.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
addPage(oPage): sap.m.QuickViewBase
Adds some page to the aggregation pages.
Parameters:
{sap.m.QuickViewPage}oPage the page to add; if empty, nothing is inserted
Returns:
{sap.m.QuickViewBase} Reference to this in order to allow method chaining
attachAfterNavigate(oData?, fnFunction, oListener?): sap.m.QuickViewBase
Attaches event handler fnFunction to the afterNavigate event of this sap.m.QuickViewBase.

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

The event is fired when navigation between two pages has completed. In case of animated transitions this event is fired with some delay after the "navigate" event.

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.QuickViewBase itself
Returns:
{sap.m.QuickViewBase} Reference to this in order to allow method chaining
attachNavigate(oData?, fnFunction, oListener?): sap.m.QuickViewBase
Attaches event handler fnFunction to the navigate event of this sap.m.QuickViewBase.

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

The event is fired when navigation between two pages has been triggered. The transition (if any) to the new page has not started yet. This event can be aborted by the application with preventDefault(), which means that there will be no navigation.

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.QuickViewBase itself
Returns:
{sap.m.QuickViewBase} Reference to this in order to allow method chaining
bindPages(oBindingInfo): sap.m.QuickViewBase
Binds aggregation pages to model data.

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

Parameters:
{object}oBindingInfo The binding information
Returns:
{sap.m.QuickViewBase} Reference to this in order to allow method chaining
destroyPages(): sap.m.QuickViewBase
Destroys all the pages in the aggregation pages.
Returns:
{sap.m.QuickViewBase} Reference to this in order to allow method chaining
detachAfterNavigate(fnFunction, oListener): sap.m.QuickViewBase
Detaches event handler fnFunction from the afterNavigate event of this sap.m.QuickViewBase.

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
Returns:
{sap.m.QuickViewBase} Reference to this in order to allow method chaining
detachNavigate(fnFunction, oListener): sap.m.QuickViewBase
Detaches event handler fnFunction from the navigate event of this sap.m.QuickViewBase.

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
Returns:
{sap.m.QuickViewBase} Reference to this in order to allow method chaining
fireAfterNavigate(mArguments?): sap.m.QuickViewBase
Fires event afterNavigate to attached listeners.

Expects the following event parameters:

  • from of type sap.ui.core.ControlDetermines the page, which has been displayed before navigation.
  • fromId of type stringDetermines the ID of the page, which has been displayed before navigation.
  • to of type sap.ui.core.ControlDetermines the page, which is now displayed after navigation.
  • toId of type stringDetermines the ID of the page, which is now displayed after navigation.
  • firstTime of type booleanDetermines whether the "to" page (a control with the ID of the page, which has been navigated to) has not been displayed/navigated to before.
  • isTo of type booleanDetermines whether this was a forward navigation.
  • isBack of type booleanDetermines whether this was a back navigation.
  • isBackToTop of type booleanDetermines whether this was a navigation to the root page.
  • isBackToPage of type booleanDetermines whether this was a navigation to a specific page.
  • direction of type stringDetermines how the navigation was triggered, possible values are "to", "back", "backToPage", and "backToTop".
  • isTopPage of type booleanDetermines whether this is a navigation to the top page.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.QuickViewBase} Reference to this in order to allow method chaining
fireNavigate(mArguments?): boolean
Fires event navigate to attached listeners.

Listeners may prevent the default action of this event by using the preventDefault-method on the event object.

Expects the following event parameters:

  • from of type sap.ui.core.ControlThe page which was displayed before the current navigation.
  • fromId of type stringThe ID of the page which was displayed before the current navigation.
  • to of type sap.ui.core.ControlThe page which will be displayed after the current navigation.
  • toId of type stringThe ID of the page which will be displayed after the current navigation.
  • firstTime of type booleanDetermines whether the "to" page (a control with the ID of the page which is currently navigated to) has not been displayed/navigated to before.
  • isTo of type booleanDetermines whether this is a forward navigation.
  • isBack of type booleanDetermines whether this is a back navigation.
  • isBackToTop of type booleanDetermines whether this is a navigation to the root page.
  • isBackToPage of type booleanDetermines whether this was a navigation to a specific page.
  • direction of type stringDetermines how the navigation was triggered, possible values are "to", "back", "backToPage", and "backToTop".
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{boolean} Whether or not to prevent the default action
getPages(): sap.m.QuickViewPage[]
Gets content of aggregation pages.

Displays a page header, object icon or image, object name with short description, and object information divided in groups

Returns:
{sap.m.QuickViewPage[]}
indexOfPage(oPage): int
Checks for the provided sap.m.QuickViewPage in the aggregation pages. and returns its index if found or -1 otherwise.
Parameters:
{sap.m.QuickViewPage}oPage The page whose index is looked for
Returns:
{int} The index of the provided control in the aggregation if found, or -1 otherwise
insertPage(oPage, iIndex): sap.m.QuickViewBase
Inserts a page into the aggregation pages.
Parameters:
{sap.m.QuickViewPage}oPage the page to insert; if empty, nothing is inserted
{int}iIndex the 0-based index the page should be inserted at; for a negative value of iIndex, the page is inserted at position 0; for a value greater than the current size of the aggregation, the page is inserted at the last position
Returns:
{sap.m.QuickViewBase} Reference to this in order to allow method chaining
navigateBack()
Navigates to the previous page if there is such.
removeAllPages(): sap.m.QuickViewPage[]
Removes all the controls from the aggregation pages.

Additionally, it unregisters them from the hosting UIArea.

Returns:
{sap.m.QuickViewPage[]} An array of the removed elements (might be empty)
removePage(vPage): sap.m.QuickViewPage
Removes a page from the aggregation pages.
Parameters:
{int|string|sap.m.QuickViewPage}vPage The pageto remove or its index or id
Returns:
{sap.m.QuickViewPage} The removed page or null
unbindPages(): sap.m.QuickViewBase
Unbinds aggregation pages from model data.
Returns:
{sap.m.QuickViewBase} Reference to this in order to allow method chaining