Class sap.m.QuickViewModule: sap/m/QuickView


The QuickView control renders a responsive popover (sap.m.Popover or sap.m.Dialog) and displays information of an object in a business-card format. It also allows this object to be linked to another object using one of the links in the responsive popover. Clicking that link updates the information in the popover with the data of the linked object. Unlimited number of objects can be linked.


Since: 1.28.11.
Constructor Summary
new sap.m.QuickView(sId?, mSettings?)Constructor for a new QuickView.
Event Summary
afterClose(oControlEvent)This event fires after the QuickView is closed.
afterOpen(oControlEvent)This event fires after the QuickView is opened.
beforeClose(oControlEvent)This event fires before the QuickView is closed.
beforeOpen(oControlEvent)This event fires before the QuickView is opened.
Events borrowed from class sap.m.QuickViewBase
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.QuickView.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.QuickView with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.QuickView.getMetadata()Returns a metadata object for class sap.m.QuickView.
attachAfterClose(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the afterClose event of this sap.m.QuickView.
attachAfterOpen(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the afterOpen event of this sap.m.QuickView.
attachBeforeClose(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the beforeClose event of this sap.m.QuickView.
attachBeforeOpen(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the beforeOpen event of this sap.m.QuickView.
detachAfterClose(fnFunction, oListener)Detaches event handler fnFunction from the afterClose event of this sap.m.QuickView.
detachAfterOpen(fnFunction, oListener)Detaches event handler fnFunction from the afterOpen event of this sap.m.QuickView.
detachBeforeClose(fnFunction, oListener)Detaches event handler fnFunction from the beforeClose event of this sap.m.QuickView.
detachBeforeOpen(fnFunction, oListener)Detaches event handler fnFunction from the beforeOpen event of this sap.m.QuickView.
fireAfterClose(mArguments?)Fires event afterClose to attached listeners.
fireAfterOpen(mArguments?)Fires event afterOpen to attached listeners.
fireBeforeClose(mArguments?)Fires event beforeClose to attached listeners.
fireBeforeOpen(mArguments?)Fires event beforeOpen to attached listeners.
getPlacement()Gets current value of property placement.
getWidth()Gets current value of property width.
openBy(oControl)Opens the QuickView.
setPlacement(sPlacement)The method sets placement position of the QuickView.
setWidth(sWidth)The method sets the width of the QuickView.
Constructor Detail
new sap.m.QuickView(sId?, mSettings?)
Constructor for a new QuickView.

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
    • placement : sap.m.PlacementType (default: Right)
    • width : sap.ui.core.CSSSize (default: 320px)
  • Events
    • afterOpen : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • afterClose : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • beforeOpen : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • beforeClose : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

In addition, all settings applicable to the base type sap.m.QuickViewBase 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
afterClose(oControlEvent)
This event fires after the QuickView is closed.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{sap.ui.core.Control}oControlEvent.getParameters.openBy This parameter refers to the control, which opens the QuickView.
{sap.m.Button}oControlEvent.getParameters.origin This parameter contains the control, which triggers the close of the QuickView. It is undefined when running on desktop or tablet.
afterOpen(oControlEvent)
This event fires after the QuickView is opened.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{sap.ui.core.Control}oControlEvent.getParameters.openBy This parameter refers to the control, which opens the QuickView.
beforeClose(oControlEvent)
This event fires before the QuickView is closed.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{sap.ui.core.Control}oControlEvent.getParameters.openBy This parameter refers to the control, which opens the QuickView.
{sap.m.Button}oControlEvent.getParameters.origin This parameter contains the control, which triggers the close of the QuickView. It is undefined when running on desktop or tablet.
beforeOpen(oControlEvent)
This event fires before the QuickView is opened.
Parameters:
{sap.ui.base.Event}oControlEvent
{sap.ui.base.EventProvider}oControlEvent.getSource
{object}oControlEvent.getParameters
{sap.ui.core.Control}oControlEvent.getParameters.openBy This parameter refers to the control, which opens the QuickView.
Method Detail
sap.m.QuickView.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.m.QuickView 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.QuickViewBase.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.QuickView.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.QuickView.
Returns:
{sap.ui.base.Metadata} Metadata object describing this class
attachAfterClose(oData?, fnFunction, oListener?): sap.m.QuickView
Attaches event handler fnFunction to the afterClose event of this sap.m.QuickView.

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

This event fires after the QuickView is closed.

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

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

This event fires after the QuickView is opened.

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

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

This event fires before the QuickView is closed.

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

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

This event fires before the QuickView is opened.

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

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

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

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

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.QuickView} Reference to this in order to allow method chaining
fireAfterClose(mArguments?): sap.m.QuickView
Fires event afterClose to attached listeners.

Expects the following event parameters:

  • openBy of type sap.ui.core.ControlThis parameter refers to the control, which opens the QuickView.
  • origin of type sap.m.ButtonThis parameter contains the control, which triggers the close of the QuickView. It is undefined when running on desktop or tablet.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.QuickView} Reference to this in order to allow method chaining
fireAfterOpen(mArguments?): sap.m.QuickView
Fires event afterOpen to attached listeners.

Expects the following event parameters:

  • openBy of type sap.ui.core.ControlThis parameter refers to the control, which opens the QuickView.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.QuickView} Reference to this in order to allow method chaining
fireBeforeClose(mArguments?): sap.m.QuickView
Fires event beforeClose to attached listeners.

Expects the following event parameters:

  • openBy of type sap.ui.core.ControlThis parameter refers to the control, which opens the QuickView.
  • origin of type sap.m.ButtonThis parameter contains the control, which triggers the close of the QuickView. It is undefined when running on desktop or tablet.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.QuickView} Reference to this in order to allow method chaining
fireBeforeOpen(mArguments?): sap.m.QuickView
Fires event beforeOpen to attached listeners.

Expects the following event parameters:

  • openBy of type sap.ui.core.ControlThis parameter refers to the control, which opens the QuickView.
Parameters:
{Map}mArguments? The arguments to pass along with the event
Returns:
{sap.m.QuickView} Reference to this in order to allow method chaining
getPlacement(): sap.m.PlacementType
Gets current value of property placement.

This property is reused from sap.m.Popover and only takes effect when running on desktop or tablet. Please refer the documentation of the placement property of sap.m.Popover.

Default value is Right.

Returns:
{sap.m.PlacementType} Value of property placement
getWidth(): sap.ui.core.CSSSize
Gets current value of property width.

The width of the QuickView. The property takes effect only when running on desktop or tablet.

Default value is 320px.

Returns:
{sap.ui.core.CSSSize} Value of property width
openBy(oControl): sap.m.QuickView
Opens the QuickView.
Parameters:
{sap.ui.core.Control}oControl The control which opens the QuickView.
Returns:
{sap.m.QuickView} Pointer to the control instance for chaining
setPlacement(sPlacement): sap.m.QuickView
The method sets placement position of the QuickView.
Parameters:
{sap.m.PlacementType}sPlacement The side from which the QuickView appears relative to the control that opens it.
Returns:
{sap.m.QuickView} Pointer to the control instance for chaining.
setWidth(sWidth): sap.m.QuickView
The method sets the width of the QuickView. Works only on desktop or tablet.
Parameters:
{sap.ui.core.CSSSize}sWidth The new width of the QuickView.
Returns:
{sap.m.QuickView} Pointer to the control instance for chaining