class sap.ui.commons.CalloutBase

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

CalloutBase is a building block for Callout. Do not use it directly. Use the Callout control instead


Constructor

Constructor for a new CalloutBase.

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.CalloutBase(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


Events Overview

Event Description
beforeOpen

Event is fired before a Callout is displayed. Call the preventDefault method of the event object to postpone opening. Application may use this event to start asynchronous Ajax call to load the Callout content

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

close

Event is fired when the Callout window is closed.

open

The event is fired when the popup is opened.

opened

Is fired when the Callout has been opened

Since: 1.11.0.

beforeOpen

Event is fired before a Callout is displayed. Call the preventDefault method of the event object to postpone opening. Application may use this event to start asynchronous Ajax call to load the Callout content

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

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
parent sap.ui.core.Control

Parent control that has this Callout as a tooltip

close

Event is fired when the Callout window is closed.

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

open

The event is fired when the popup is opened.

Param Type Description
oControlEvent sap.ui.base.Event
getSource sap.ui.base.EventProvider
getParameters object
parent sap.ui.core.Control

Parent control that has this Callout as a tooltip

opened

Is fired when the Callout has been opened

Since: 1.11.0.

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

Methods Overview

Method Description
adjustPosition

Adjust position of the already opened Callout window. Call this method each time when the size of the opened Callout window may be changed due to new or changed contents.

attachBeforeOpen

Attaches event handler fnFunction to the beforeOpen event of this sap.ui.commons.CalloutBase.

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

Event is fired before a Callout is displayed. Call the preventDefault method of the event object to postpone opening. Application may use this event to start asynchronous Ajax call to load the Callout content

attachClose

Attaches event handler fnFunction to the close event of this sap.ui.commons.CalloutBase.

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

Event is fired when the Callout window is closed.

attachOpen

Attaches event handler fnFunction to the open event of this sap.ui.commons.CalloutBase.

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

The event is fired when the popup is opened.

attachOpened

Attaches event handler fnFunction to the opened event of this sap.ui.commons.CalloutBase.

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

Is fired when the Callout has been opened

close

Closes Callout

detachBeforeOpen

Detaches event handler fnFunction from the beforeOpen event of this sap.ui.commons.CalloutBase.

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

detachClose

Detaches event handler fnFunction from the close event of this sap.ui.commons.CalloutBase.

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

detachOpen

Detaches event handler fnFunction from the open event of this sap.ui.commons.CalloutBase.

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

detachOpened

Detaches event handler fnFunction from the opened event of this sap.ui.commons.CalloutBase.

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

sap.ui.commons.CalloutBase.extend

Creates a new subclass of class sap.ui.commons.CalloutBase 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.TooltipBase.extend.

fireBeforeOpen

Fires event beforeOpen to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

fireClose

Fires event close to attached listeners.

fireOpen

Fires event open to attached listeners.

fireOpened

Fires event opened to attached listeners.

sap.ui.commons.CalloutBase.getMetadata

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

setPosition

Set position of the Callout window relative to the parent control. This function automatically calculates and sets the correct offset, use it instead of setMyPosition/setAtPosition.

adjustPosition

Adjust position of the already opened Callout window. Call this method each time when the size of the opened Callout window may be changed due to new or changed contents.

attachBeforeOpen

Attaches event handler fnFunction to the beforeOpen event of this sap.ui.commons.CalloutBase.

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

Event is fired before a Callout is displayed. Call the preventDefault method of the event object to postpone opening. Application may use this event to start asynchronous Ajax call to load the Callout content

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

attachClose

Attaches event handler fnFunction to the close event of this sap.ui.commons.CalloutBase.

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

Event is fired when the Callout window is closed.

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

attachOpen

Attaches event handler fnFunction to the open event of this sap.ui.commons.CalloutBase.

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

The event is fired when the popup is opened.

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

attachOpened

Attaches event handler fnFunction to the opened event of this sap.ui.commons.CalloutBase.

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

Is fired when the Callout has been opened

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

close

Closes Callout

detachBeforeOpen

Detaches event handler fnFunction from the beforeOpen event of this sap.ui.commons.CalloutBase.

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

detachClose

Detaches event handler fnFunction from the close event of this sap.ui.commons.CalloutBase.

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

detachOpen

Detaches event handler fnFunction from the open event of this sap.ui.commons.CalloutBase.

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

detachOpened

Detaches event handler fnFunction from the opened event of this sap.ui.commons.CalloutBase.

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.CalloutBase.extend

Creates a new subclass of class sap.ui.commons.CalloutBase 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.TooltipBase.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

fireBeforeOpen

Fires event beforeOpen to attached listeners.

Listeners may prevent the default action of this event by calling the preventDefault method on the event object. The return value of this method indicates whether the default action should be executed.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

parent sap.ui.core.Control

Parent control that has this Callout as a tooltip

fireClose

Fires event close to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

fireOpen

Fires event open to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

parent sap.ui.core.Control

Parent control that has this Callout as a tooltip

fireOpened

Fires event opened to attached listeners.

Param Type DefaultValue Description
mParameters object

Parameters to pass along with the event

sap.ui.commons.CalloutBase.getMetadata

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

setPosition

Set position of the Callout window relative to the parent control. This function automatically calculates and sets the correct offset, use it instead of setMyPosition/setAtPosition.

Param Type DefaultValue Description
myPosition sap.ui.core.Dock

docking position of the Callout

atPosition sap.ui.core.Dock

docking position of the parent control