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.
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 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
. 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
. 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(mArguments?)Fires event beforeOpen
to attached listeners. fireClose(mArguments?)Fires event close
to attached listeners. fireOpen(mArguments?)Fires event open
to attached listeners. fireOpened(mArguments?)Fires event opened
to attached listeners. setPosition(myPosition, atPosition)Set position of the Callout window relative to the parent control. attachClosed,
detachClosed,
fireClosed,
getAtPosition,
getCloseDelay,
getCloseDuration,
getCollision,
getMyPosition,
getOffset,
getOpenDelay,
getOpenDuration,
getText,
setAtPosition,
setCloseDelay,
setCloseDuration,
setCollision,
setMyPosition,
setOffset,
setOpenDelay,
setOpenDuration,
setText addStyleClass,
allowTextSelection,
attachBrowserEvent,
attachValidateFieldGroup,
checkFieldGroupIds,
clone,
detachBrowserEvent,
detachValidateFieldGroup,
fireValidateFieldGroup,
getAccessibilityInfo,
getBusy,
getBusyIndicatorDelay,
getControlsByFieldGroupId,
getFieldGroupIds,
getIdForLabel,
getRenderer,
getVisible,
hasStyleClass,
invalidate,
isBusy,
onAfterRendering,
onBeforeRendering,
placeAt,
removeStyleClass,
rerender,
setBusy,
setBusyIndicatorDelay,
setFieldGroupIds,
setVisible,
toggleStyleClass,
triggerValidateFieldGroup $,
addCustomData,
addDependent,
addEventDelegate,
applyFocusInfo,
bindElement,
data,
destroy,
destroyCustomData,
destroyDependents,
destroyLayoutData,
destroyTooltip,
enhanceAccessibilityState,
findElements,
fireEvent,
getCustomData,
getDependents,
getDomRef,
getElementBinding,
getFocusDomRef,
getFocusInfo,
getInterface,
getLayoutData,
getMetadata,
getTooltip,
getTooltip_AsString,
getTooltip_Text,
indexOfCustomData,
indexOfDependent,
insertCustomData,
insertDependent,
prop,
removeAllCustomData,
removeAllDependents,
removeCustomData,
removeDependent,
removeEventDelegate,
setLayoutData,
setTooltip,
toString,
unbindElement addAggregation,
addAssociation,
applySettings,
attachFormatError,
attachModelContextChange,
attachParseError,
attachValidationError,
attachValidationSuccess,
bindAggregation,
bindContext,
bindObject,
bindProperty,
destroyAggregation,
detachFormatError,
detachModelContextChange,
detachParseError,
detachValidationError,
detachValidationSuccess,
findAggregatedObjects,
fireFormatError,
fireModelContextChange,
fireParseError,
fireValidationError,
fireValidationSuccess,
getAggregation,
getAssociation,
getBinding,
getBindingContext,
getBindingInfo,
getBindingPath,
getEventingParent,
getId,
getModel,
getObjectBinding,
getOriginInfo,
getParent,
getProperty,
hasModel,
indexOfAggregation,
insertAggregation,
isBound,
isInvalidateSuppressed,
isTreeBinding,
propagateMessages,
removeAggregation,
removeAllAggregation,
removeAllAssociation,
removeAssociation,
setAggregation,
setAssociation,
setBindingContext,
setModel,
setProperty,
unbindAggregation,
unbindContext,
unbindObject,
unbindProperty,
validateAggregation,
validateProperty 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:
{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.38. Instead, use the
sap.m.Popover
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:
close(oControlEvent)
Event is fired when the Callout window is closed.
Parameters:
open(oControlEvent)
The event is fired when the popup is opened.
Parameters:
opened(oControlEvent)
Is fired when the Callout has been opened
Parameters:
- 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:
{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 |
Returns a metadata object for class sap.ui.commons.CalloutBase.
Returns:
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.
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:
{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.ui.commons.CalloutBase itself |
Returns:
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:
{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.ui.commons.CalloutBase itself |
Returns:
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:
{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.ui.commons.CalloutBase itself |
Returns:
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:
{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.ui.commons.CalloutBase itself |
- Since:
- 1.11.0
Returns:
close(): void
Closes Callout
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:
{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:
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:
{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:
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:
{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:
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:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
- Since:
- 1.11.0
Returns:
fireBeforeOpen(mArguments?): 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.
Expects the following event parameters:
parent
of type sap.ui.core.Control
Parent control that has this Callout as a tooltip
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
{boolean} | Whether or not to prevent the default action |
Fires event close
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event
open
to attached listeners.
Expects the following event parameters:
parent
of type sap.ui.core.Control
Parent control that has this Callout as a tooltip
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
Fires event opened
to attached listeners.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
- Since:
- 1.11.0
Returns:
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:
Returns: