Class sap.ui.commons.CalloutBaseModule: sap/ui/commons/CalloutBase

extends TooltipBase
known direct subclasses: Callout, QuickView

CalloutBase is a building block for Callout. Do not use it directly. Use the Callout control instead
Deprecated API:
Since version 1.38. Instead, use the sap.m.Popover control.
Constructor Summary
new sap.ui.commons.CalloutBase(sId?, mSettings?)Constructor for a new CalloutBase.
Event Summary
beforeOpen(oControlEvent)Event is fired before a Callout is displayed.
close(oControlEvent)Event is fired when the Callout window is closed.
open(oControlEvent)The event is fired when the popup is opened.
opened(oControlEvent)Is fired when the Callout has been opened
Events borrowed from class sap.ui.core.TooltipBase
Events borrowed from class sap.ui.core.Control
Method Summary
sap.ui.commons.CalloutBase.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.ui.commons.CalloutBase with name sClassName and enriches it with the information contained in oClassInfo.
sap.ui.commons.CalloutBase.getMetadata()Returns a metadata object for class sap.ui.commons.CalloutBase.
adjustPosition()Adjust position of the already opened Callout window.
attachBeforeOpen(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the beforeOpen event of this sap.ui.commons.CalloutBase.
attachClose(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the close event of this sap.ui.commons.CalloutBase.
attachOpen(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the open event of this sap.ui.commons.CalloutBase.
attachOpened(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the opened event of this sap.ui.commons.CalloutBase.
close()Closes Callout
detachBeforeOpen(fnFunction, oListener)Detaches event handler fnFunction from the beforeOpen event of this sap.ui.commons.CalloutBase.
detachClose(fnFunction, oListener)Detaches event handler fnFunction from the close event of this sap.ui.commons.CalloutBase.
detachOpen(fnFunction, oListener)Detaches event handler fnFunction from the open event of this sap.ui.commons.CalloutBase.
detachOpened(fnFunction, oListener)Detaches event handler fnFunction from the opened event of this sap.ui.commons.CalloutBase.
fireBeforeOpen(mParameters?)Fires event beforeOpen to attached listeners.
fireClose(mParameters?)Fires event close to attached listeners.
fireOpen(mParameters?)Fires event open to attached listeners.
fireOpened(mParameters?)Fires event opened to attached listeners.
setPosition(myPosition, atPosition)Set position of the Callout window relative to the parent control.
Constructor Detail
new sap.ui.commons.CalloutBase(sId?, mSettings?)

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 for a general description of the syntax of the settings object.

The supported settings are:

  • Events

    • open : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • close : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • beforeOpen : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]
    • opened : fnListenerFunction or [fnListenerFunction, oListenerObject] or [oData, fnListenerFunction, oListenerObject]

In addition, all settings applicable to the base type sap.ui.core.TooltipBase can be used as well.

Parameters:
stringsId?id for the new control, generated automatically if no id is given
objectmSettings?initial settings for the new control
Event Detail
beforeOpen(oControlEvent)
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
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
sap.ui.core.ControloControlEvent.getParameters.parentParent control that has this Callout as a tooltip
close(oControlEvent)
Event is fired when the Callout window is closed.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
open(oControlEvent)
The event is fired when the popup is opened.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
sap.ui.core.ControloControlEvent.getParameters.parentParent control that has this Callout as a tooltip
opened(oControlEvent)
Is fired when the Callout has been opened
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
Since:
1.11.0
Method Detail
sap.ui.commons.CalloutBase.extend(sClassName, oClassInfo?, FNMetaImpl?): function

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.

Parameters:
stringsClassNameName of the class being created
objectoClassInfo?Object literal with information about the class
functionFNMetaImpl?Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata
Returns:
functionCreated class / constructor function
sap.ui.commons.CalloutBase.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.ui.commons.CalloutBase.
Returns:
sap.ui.base.MetadataMetadata object describing this class
adjustPosition(): void
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(oData?, fnFunction, oListener?): sap.ui.commons.CalloutBase

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

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.commons.CalloutBase itself
Returns:
sap.ui.commons.CalloutBaseReference to this in order to allow method chaining
attachClose(oData?, fnFunction, oListener?): sap.ui.commons.CalloutBase

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.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.commons.CalloutBase itself
Returns:
sap.ui.commons.CalloutBaseReference to this in order to allow method chaining
attachOpen(oData?, fnFunction, oListener?): sap.ui.commons.CalloutBase

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.

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.commons.CalloutBase itself
Returns:
sap.ui.commons.CalloutBaseReference to this in order to allow method chaining
attachOpened(oData?, fnFunction, oListener?): sap.ui.commons.CalloutBase

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

Parameters:
objectoData?An application-specific payload object that will be passed to the event handler along with the event object when firing the event
functionfnFunctionThe function to be called when the event occurs
objectoListener?Context object to call the event handler with. Defaults to this sap.ui.commons.CalloutBase itself
Returns:
sap.ui.commons.CalloutBaseReference to this in order to allow method chaining
Since:
1.11.0
close(): void
Closes Callout
detachBeforeOpen(fnFunction, oListener): sap.ui.commons.CalloutBase

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.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.commons.CalloutBaseReference to this in order to allow method chaining
detachClose(fnFunction, oListener): sap.ui.commons.CalloutBase

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.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.commons.CalloutBaseReference to this in order to allow method chaining
detachOpen(fnFunction, oListener): sap.ui.commons.CalloutBase

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.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.commons.CalloutBaseReference to this in order to allow method chaining
detachOpened(fnFunction, oListener): sap.ui.commons.CalloutBase

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.

Parameters:
functionfnFunctionThe function to be called, when the event occurs
objectoListenerContext object on which the given function had to be called
Returns:
sap.ui.commons.CalloutBaseReference to this in order to allow method chaining
Since:
1.11.0
fireBeforeOpen(mParameters?): boolean

Fires event beforeOpen to attached listeners.

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

Parameters:
objectmParameters?Parameters to pass along with the event
sap.ui.core.ControlmParameters.parent?Parent control that has this Callout as a tooltip
Returns:
booleanWhether or not to prevent the default action
fireClose(mParameters?): sap.ui.commons.CalloutBase
Fires event close to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.ui.commons.CalloutBaseReference to this in order to allow method chaining
fireOpen(mParameters?): sap.ui.commons.CalloutBase
Fires event open to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
sap.ui.core.ControlmParameters.parent?Parent control that has this Callout as a tooltip
Returns:
sap.ui.commons.CalloutBaseReference to this in order to allow method chaining
fireOpened(mParameters?): sap.ui.commons.CalloutBase
Fires event opened to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
Returns:
sap.ui.commons.CalloutBaseReference to this in order to allow method chaining
Since:
1.11.0
setPosition(myPosition, atPosition): sap.ui.commons.CalloutBase
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.
Parameters:
sap.ui.core.DockmyPositiondocking position of the Callout
sap.ui.core.DockatPositiondocking position of the parent control
Returns:
sap.ui.commons.CalloutBasethis to allow method chaining