Class sap.m.PopoverModule: sap/m/Popover

extends Control
implements PopupInterface

Displays additional information for an object in a compact way.

Overview

The popover displays additional information for an object in a compact way and without leaving the page. The popover can contain various UI elements such as fields, tables, images, and charts. It can also include actions in the footer.

Structure

The popover has three main areas:

  • Header (optional) - with a back button and a title
  • Content - holds all the controls
  • Footer (optional) - with additional action buttons

Guidelines

  • Do not overlap popovers.
  • You can determine the placement of the popover relative to the control that opens it.
  • Ensure that the content has a basic design and shows only the most important information.

Usage

When to use:

  • You need to define your own structure of controls within the popover.

When not to use:

  • The QuickView is more appropriate for your use case.

Responsive Behavior

The popover is closed when the user clicks or taps outside the popover or selects an action within the popover. You can prevent this with the modal property. The popover can be resized when the resizable property is enabled.

  • sap.m.Popover is not responsive on mobile devices - it will always be rendered as a popover and you have to take care of its size and position.
  • sap.m.ResponsivePopover is adaptive and responsive. It renders as a dialog with a close button in the header on phones, and as a popover on tablets.
Constructor Summary
new sap.m.Popover(sId?, mSettings?)Constructor for a new Popover.
Event Summary
afterClose(oControlEvent)This event will be fired after the popover is closed.
afterOpen(oControlEvent)This event will be fired after the popover is opened.
beforeClose(oControlEvent)This event will be fired before the popover is closed.
beforeOpen(oControlEvent)This event will be fired before the popover is opened.
Events borrowed from class sap.ui.core.Control
Method Summary
sap.m.Popover.extend(sClassName, oClassInfo?, FNMetaImpl?)Creates a new subclass of class sap.m.Popover with name sClassName and enriches it with the information contained in oClassInfo.
sap.m.Popover.getMetadata()Returns a metadata object for class sap.m.Popover.
sap.m.Popover.outerHeight(oElement, bIncludeMargin)Calculate outerHeight of the element; used as hook for SVG elements
sap.m.Popover.outerWidth(oElement, bIncludeMargin)Calculate outerWidth of the element; used as hook for SVG elements
_afterAdjustPositionAndArrowHook()Hook called after adjusment of the Popover position.
_getAnyHeader()If customHeader is set, this will return the customHeaer.
addAriaDescribedBy(vAriaDescribedBy)Adds some ariaDescribedBy into the association ariaDescribedBy.
addAriaLabelledBy(vAriaLabelledBy)Adds some ariaLabelledBy into the association ariaLabelledBy.
addContent(oContent)Adds some content to the aggregation content.
attachAfterClose(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the afterClose event of this sap.m.Popover.
attachAfterOpen(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the afterOpen event of this sap.m.Popover.
attachBeforeClose(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the beforeClose event of this sap.m.Popover.
attachBeforeOpen(oData?, fnFunction, oListener?)Attaches event handler fnFunction to the beforeOpen event of this sap.m.Popover.
close()Closes the popover when it's already opened.
destroyBeginButton()Destroys the beginButton in the aggregation beginButton.
destroyContent()Destroys all the content in the aggregation content.
destroyCustomHeader()Destroys the customHeader in the aggregation customHeader.
destroyEndButton()Destroys the endButton in the aggregation endButton.
destroyFooter()Destroys the footer in the aggregation footer.
destroySubHeader()Destroys the subHeader in the aggregation subHeader.
detachAfterClose(fnFunction, oListener)Detaches event handler fnFunction from the afterClose event of this sap.m.Popover.
detachAfterOpen(fnFunction, oListener)Detaches event handler fnFunction from the afterOpen event of this sap.m.Popover.
detachBeforeClose(fnFunction, oListener)Detaches event handler fnFunction from the beforeClose event of this sap.m.Popover.
detachBeforeOpen(fnFunction, oListener)Detaches event handler fnFunction from the beforeOpen event of this sap.m.Popover.
fireAfterClose(mParameters?)Fires event afterClose to attached listeners.
fireAfterOpen(mParameters?)Fires event afterOpen to attached listeners.
fireBeforeClose(mParameters?)Fires event beforeClose to attached listeners.
fireBeforeOpen(mParameters?)Fires event beforeOpen to attached listeners.
getAriaDescribedBy()Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.
getAriaLabelledBy()Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
getBeginButton()Gets content of aggregation beginButton.
getContent()Gets content of aggregation content.
getContentHeight()Gets current value of property contentHeight.
getContentMinWidth()Gets current value of property contentMinWidth.
getContentWidth()Gets current value of property contentWidth.
getCustomHeader()Gets content of aggregation customHeader.
getEndButton()Gets content of aggregation endButton.
getFooter()Gets content of aggregation footer.
getHorizontalScrolling()Gets current value of property horizontalScrolling.
getInitialFocus()ID of the element which is the current target of the association initialFocus, or null.
getModal()Gets current value of property modal.
getOffsetX()Gets current value of property offsetX.
getOffsetY()Gets current value of property offsetY.
getPlacement()Gets current value of property placement.
getResizable()Gets current value of property resizable.
getShowArrow()Gets current value of property showArrow.
getShowHeader()Gets current value of property showHeader.
getSubHeader()Gets content of aggregation subHeader.
getTitle()Gets current value of property title.
getVerticalScrolling()Gets current value of property verticalScrolling.
indexOfContent(oContent)Checks for the provided sap.ui.core.Control in the aggregation content.
insertContent(oContent, iIndex)Inserts a content into the aggregation content.
isOpen()The method checks if the Popover is open.
openBy(oControl, bSkipInstanceManager)Opens the Popover and set the Popover position according to the placement property around the oControl parameter.
removeAllAriaDescribedBy()Removes all the controls in the association named ariaDescribedBy.
removeAllAriaLabelledBy()Removes all the controls in the association named ariaLabelledBy.
removeAllContent()Removes all the controls from the aggregation content.
removeAriaDescribedBy(vAriaDescribedBy)Removes an ariaDescribedBy from the association named ariaDescribedBy.
removeAriaLabelledBy(vAriaLabelledBy)Removes an ariaLabelledBy from the association named ariaLabelledBy.
removeContent(vContent)Removes a content from the aggregation content.
setBeginButton(oBeginButton)Sets the aggregated beginButton.
setBounce(bBounce)Setter for property bounce.
setContentHeight(sContentHeight)Sets a new value for property contentHeight.
setContentMinWidth(sContentMinWidth)Sets a new value for property contentMinWidth.
setContentWidth(sContentWidth)Sets a new value for property contentWidth.
setCustomHeader(oCustomHeader)Sets the aggregated customHeader.
setEndButton(oEndButton)Sets the aggregated endButton.
setFollowOf(bValue)The followOf feature closes the Popover when the position of the control that opened the Popover changes by at least 32 pixels (on desktop browsers).
setFooter(oFooter)Sets the aggregated footer.
setHorizontalScrolling(bHorizontalScrolling)Sets a new value for property horizontalScrolling.
setInitialFocus(oInitialFocus)Sets the associated initialFocus.
setModal(bModal, sModalCSSClass?)Setter for property modal.
setOffsetX(iOffsetX)Sets a new value for property offsetX.
setOffsetY(iOffsetY)Sets a new value for property offsetY.
setPlacement(sPlacement)Set the placement of the Popover.
setResizable(bResizable)Sets a new value for property resizable.
setShowArrow(bShowArrow)Sets a new value for property showArrow.
setShowHeader(bShowHeader)Sets a new value for property showHeader.
setSubHeader(oSubHeader)Sets the aggregated subHeader.
setTitle(sTitle)The setter of the title property.
setVerticalScrolling(bVerticalScrolling)Sets a new value for property verticalScrolling.
getEnableScrolling()Gets current value of property enableScrolling.
getLeftButton()ID of the element which is the current target of the association leftButton, or null.
getRightButton()ID of the element which is the current target of the association rightButton, or null.
setEnableScrolling(bEnableScrolling)Sets a new value for property enableScrolling.
setLeftButton(oLeftButton)Sets the associated leftButton.
setRightButton(oRightButton)Sets the associated rightButton.
Constructor Detail
new sap.m.Popover(sId?, mSettings?)

Constructor for a new Popover.

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:

In addition, all settings applicable to the base type sap.ui.core.Control 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
afterClose(oControlEvent)
This event will be fired after the popover is closed.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
sap.ui.core.ControloControlEvent.getParameters.openByThis refers to the control which opens the popover.
afterOpen(oControlEvent)
This event will be fired after the popover is opened.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
sap.ui.core.ControloControlEvent.getParameters.openByThis refers to the control which opens the popover.
beforeClose(oControlEvent)
This event will be fired before the popover is closed.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
sap.ui.core.ControloControlEvent.getParameters.openByThis refers to the control which opens the popover.
beforeOpen(oControlEvent)
This event will be fired before the popover is opened.
Parameters:
sap.ui.base.EventoControlEvent
sap.ui.base.EventProvideroControlEvent.getSource
objectoControlEvent.getParameters
sap.ui.core.ControloControlEvent.getParameters.openByThis refers to the control which opens the popover.
Method Detail
sap.m.Popover.extend(sClassName, oClassInfo?, FNMetaImpl?): function

Creates a new subclass of class sap.m.Popover 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:
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.m.Popover.getMetadata(): sap.ui.base.Metadata
Returns a metadata object for class sap.m.Popover.
Returns:
sap.ui.base.MetadataMetadata object describing this class
sap.m.Popover.outerHeight(oElement, bIncludeMargin)
Calculate outerHeight of the element; used as hook for SVG elements
Parameters:
HTMLElementoElementAn Element for which outerHeight will be calculated.
booleanbIncludeMarginDetermines if the margins should be included in the calculated outerHeight. Default value is false.
sap.m.Popover.outerWidth(oElement, bIncludeMargin)
Calculate outerWidth of the element; used as hook for SVG elements
Parameters:
HTMLElementoElementAn Element for which outerWidth will be calculated.
booleanbIncludeMarginDetermines if the margins should be included in the calculated outerWidth. Default value is false.
_afterAdjustPositionAndArrowHook()
Hook called after adjusment of the Popover position.
_getAnyHeader()
If customHeader is set, this will return the customHeaer. Otherwise it creates a header and put the title and buttons if needed inside, and finally return this newly create header.
addAriaDescribedBy(vAriaDescribedBy): sap.m.Popover
Adds some ariaDescribedBy into the association ariaDescribedBy.
Parameters:
sap.ui.core.ID|sap.ui.core.ControlvAriaDescribedBythe ariaDescribedBy to add; if empty, nothing is inserted
Returns:
sap.m.PopoverReference to this in order to allow method chaining
addAriaLabelledBy(vAriaLabelledBy): sap.m.Popover
Adds some ariaLabelledBy into the association ariaLabelledBy.
Parameters:
sap.ui.core.ID|sap.ui.core.ControlvAriaLabelledBythe ariaLabelledBy to add; if empty, nothing is inserted
Returns:
sap.m.PopoverReference to this in order to allow method chaining
addContent(oContent): sap.m.Popover
Adds some content to the aggregation content.
Parameters:
sap.ui.core.ControloContentthe content to add; if empty, nothing is inserted
Returns:
sap.m.PopoverReference to this in order to allow method chaining
attachAfterClose(oData?, fnFunction, oListener?): sap.m.Popover

Attaches event handler fnFunction to the afterClose event of this sap.m.Popover.

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

This event will be fired after the popover 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.m.Popover itself
Returns:
sap.m.PopoverReference to this in order to allow method chaining
attachAfterOpen(oData?, fnFunction, oListener?): sap.m.Popover

Attaches event handler fnFunction to the afterOpen event of this sap.m.Popover.

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

This event will be fired after the popover 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.m.Popover itself
Returns:
sap.m.PopoverReference to this in order to allow method chaining
attachBeforeClose(oData?, fnFunction, oListener?): sap.m.Popover

Attaches event handler fnFunction to the beforeClose event of this sap.m.Popover.

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

This event will be fired before the popover 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.m.Popover itself
Returns:
sap.m.PopoverReference to this in order to allow method chaining
attachBeforeOpen(oData?, fnFunction, oListener?): sap.m.Popover

Attaches event handler fnFunction to the beforeOpen event of this sap.m.Popover.

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

This event will be fired before the popover 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.m.Popover itself
Returns:
sap.m.PopoverReference to this in order to allow method chaining
close(): sap.m.Popover
Closes the popover when it's already opened.
Returns:
sap.m.PopoverReference to the control instance for chaining
destroyBeginButton(): sap.m.Popover
Destroys the beginButton in the aggregation beginButton.
Returns:
sap.m.PopoverReference to this in order to allow method chaining
Since:
1.15.1
destroyContent(): sap.m.Popover
Destroys all the content in the aggregation content.
Returns:
sap.m.PopoverReference to this in order to allow method chaining
destroyCustomHeader(): sap.m.Popover
Destroys the customHeader in the aggregation customHeader.
Returns:
sap.m.PopoverReference to this in order to allow method chaining
destroyEndButton(): sap.m.Popover
Destroys the endButton in the aggregation endButton.
Returns:
sap.m.PopoverReference to this in order to allow method chaining
Since:
1.15.1
destroyFooter(): sap.m.Popover
Destroys the footer in the aggregation footer.
Returns:
sap.m.PopoverReference to this in order to allow method chaining
destroySubHeader(): sap.m.Popover
Destroys the subHeader in the aggregation subHeader.
Returns:
sap.m.PopoverReference to this in order to allow method chaining
Since:
1.15.1
detachAfterClose(fnFunction, oListener): sap.m.Popover

Detaches event handler fnFunction from the afterClose event of this sap.m.Popover.

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.m.PopoverReference to this in order to allow method chaining
detachAfterOpen(fnFunction, oListener): sap.m.Popover

Detaches event handler fnFunction from the afterOpen event of this sap.m.Popover.

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.m.PopoverReference to this in order to allow method chaining
detachBeforeClose(fnFunction, oListener): sap.m.Popover

Detaches event handler fnFunction from the beforeClose event of this sap.m.Popover.

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.m.PopoverReference to this in order to allow method chaining
detachBeforeOpen(fnFunction, oListener): sap.m.Popover

Detaches event handler fnFunction from the beforeOpen event of this sap.m.Popover.

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.m.PopoverReference to this in order to allow method chaining
fireAfterClose(mParameters?): sap.m.Popover
Fires event afterClose to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
sap.ui.core.ControlmParameters.openBy?This refers to the control which opens the popover.
Returns:
sap.m.PopoverReference to this in order to allow method chaining
fireAfterOpen(mParameters?): sap.m.Popover
Fires event afterOpen to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
sap.ui.core.ControlmParameters.openBy?This refers to the control which opens the popover.
Returns:
sap.m.PopoverReference to this in order to allow method chaining
fireBeforeClose(mParameters?): sap.m.Popover
Fires event beforeClose to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
sap.ui.core.ControlmParameters.openBy?This refers to the control which opens the popover.
Returns:
sap.m.PopoverReference to this in order to allow method chaining
fireBeforeOpen(mParameters?): sap.m.Popover
Fires event beforeOpen to attached listeners.
Parameters:
objectmParameters?Parameters to pass along with the event
sap.ui.core.ControlmParameters.openBy?This refers to the control which opens the popover.
Returns:
sap.m.PopoverReference to this in order to allow method chaining
getAriaDescribedBy(): sap.ui.core.ID[]
Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.
Returns:
sap.ui.core.ID[]
getAriaLabelledBy(): sap.ui.core.ID[]
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
Returns:
sap.ui.core.ID[]
getBeginButton(): sap.ui.core.Control

Gets content of aggregation beginButton.

BeginButton is shown at the left side (right side in RTL mode) inside the header. When showHeader is set to false, the property is ignored.

Returns:
sap.ui.core.Control
Since:
1.15.1
getContent(): sap.ui.core.Control[]

Gets content of aggregation content.

The content inside the popover.

Returns:
sap.ui.core.Control[]
getContentHeight(): sap.ui.core.CSSSize

Gets current value of property contentHeight.

Set the height of the content area inside Popover. When controls which adapt their size to the parent control are added directly into Popover, for example sap.m.Page control, a size needs to be specified to the content area of the Popover. Otherwise, Popover control isn't able to display the content in the right way. This values isn't necessary for controls added to Popover directly which can decide their size by themselves, for exmaple sap.m.List, sap.m.Image etc., only needed for controls that adapt their size to the parent control.

Returns:
sap.ui.core.CSSSizeValue of property contentHeight
Since:
1.9.0
getContentMinWidth(): sap.ui.core.CSSSize

Gets current value of property contentMinWidth.

Sets the minimum width of the content area inside popover.

Default value is .

Returns:
sap.ui.core.CSSSizeValue of property contentMinWidth
Since:
1.36
getContentWidth(): sap.ui.core.CSSSize

Gets current value of property contentWidth.

Set the width of the content area inside Popover. When controls which adapt their size to the parent control are added directly into Popover, for example sap.m.Page control, a size needs to be specified to the content area of the Popover. Otherwise, Popover control isn't able to display the content in the right way. This values isn't necessary for controls added to Popover directly which can decide their size by themselves, for exmaple sap.m.List, sap.m.Image etc., only needed for controls that adapt their size to the parent control.

Returns:
sap.ui.core.CSSSizeValue of property contentWidth
Since:
1.9.0
getCustomHeader(): sap.ui.core.Control

Gets content of aggregation customHeader.

Any control that needed to be displayed in the header area. When this is set, the showHeader property is ignored, and only this customHeader is shown on the top of popover.

Returns:
sap.ui.core.Control
getEndButton(): sap.ui.core.Control

Gets content of aggregation endButton.

EndButton is always shown at the right side (left side in RTL mode) inside the header. When showHeader is set to false, the property is ignored.

Returns:
sap.ui.core.Control
Since:
1.15.1
getFooter(): sap.ui.core.Control

Gets content of aggregation footer.

This is optional footer which is shown on the bottom of the popover.

Returns:
sap.ui.core.Control
getHorizontalScrolling(): boolean

Gets current value of property horizontalScrolling.

This property indicates if user can scroll horizontally inside popover when the content is bigger than the content area. However, when scrollable control (sap.m.ScrollContainer, sap.m.Page) is in the popover, this property needs to be set to false to disable the scrolling in popover in order to make the scrolling in the child control work properly. Popover detects if there's sap.m.NavContainer, sap.m.Page, or sap.m.ScrollContainer as direct child added to Popover. If there is, Popover will turn off scrolling by setting this property to false automatically ignoring the existing value of this property.

Default value is true.

Returns:
booleanValue of property horizontalScrolling
Since:
1.15.0
getInitialFocus(): sap.ui.core.ID
ID of the element which is the current target of the association initialFocus, or null.
Returns:
sap.ui.core.ID
Since:
1.15.0
getModal(): boolean

Gets current value of property modal.

If the popover will not be closed when tapping outside the popover. It also blocks any interaction with the background. The default value is false.

Default value is false.

Returns:
booleanValue of property modal
getOffsetX(): int

Gets current value of property offsetX.

The offset for the popover placement in the x axis. It's with unit pixel.

Default value is 0.

Returns:
intValue of property offsetX
getOffsetY(): int

Gets current value of property offsetY.

The offset for the popover placement in the y axis. It's with unit pixel.

Default value is 0.

Returns:
intValue of property offsetY
getPlacement(): sap.m.PlacementType

Gets current value of property placement.

This is the information about on which side will the popover be placed at. Possible values are sap.m.PlacementType.Left, sap.m.PlacementType.Right, sap.m.PlacementType.Top, sap.m.PlacementType.Bottom, sap.m.PlacementType.Horizontal, sap.m.PlacementType.HorizontalPreferredLeft, sap.m.PlacementType.HorizontalPreferredRight, sap.m.PlacementType.Vertical, sap.m.PlacementType.VerticalPreferredTop, sap.m.PlacementType.VerticalPreferredBottom, sap.m.PlacementType.Auto. The default value is sap.m.PlacementType.Right. Setting this property while popover is open won't cause any rerendering of the popover, but it will take effect when it's opened again.

Default value is Right.

Returns:
sap.m.PlacementTypeValue of property placement
getResizable(): boolean

Gets current value of property resizable.

Whether resize option is enabled.

Default value is false.

Returns:
booleanValue of property resizable
Experimental API:
since 1.36.4 Do not use directly on Popover while in experimental mode!
Since:
1.36.4
getShowArrow(): boolean

Gets current value of property showArrow.

Whether Popover arrow should be visible

Default value is true.

Returns:
booleanValue of property showArrow
Since:
1.31
getShowHeader(): boolean

Gets current value of property showHeader.

If a header should be shown at the top of the popover.

Default value is true.

Returns:
booleanValue of property showHeader
getSubHeader(): sap.ui.core.Control

Gets content of aggregation subHeader.

When subHeader is assigned to Popover, it's rendered directly after the main header if there is, or at the beginning of Popover when there's no main header. SubHeader is out of the content area and won't be scrolled when content's size is bigger than the content area's size.

Returns:
sap.ui.core.Control
Since:
1.15.1
getTitle(): string

Gets current value of property title.

Title text appears in the header. This property will be ignored when showHeader is set to false.

Returns:
stringValue of property title
getVerticalScrolling(): boolean

Gets current value of property verticalScrolling.

This property indicates if user can scroll vertically inside popover when the content is bigger than the content area. However, when scrollable control (sap.m.ScrollContainer, sap.m.Page) is in the popover, this property needs to be set to false to disable the scrolling in popover in order to make the scrolling in the child control work properly. Popover detects if there's sap.m.NavContainer, sap.m.Page, or sap.m.ScrollContainer as direct child added to Popover. If there is, Popover will turn off scrolling by setting this property to false automatically ignoring the existing value of this property.

Default value is true.

Returns:
booleanValue of property verticalScrolling
Since:
1.15.0
indexOfContent(oContent): int
Checks for the provided sap.ui.core.Control in the aggregation content. and returns its index if found or -1 otherwise.
Parameters:
sap.ui.core.ControloContentThe content whose index is looked for
Returns:
intThe index of the provided control in the aggregation if found, or -1 otherwise
insertContent(oContent, iIndex): sap.m.Popover
Inserts a content into the aggregation content.
Parameters:
sap.ui.core.ControloContentthe content to insert; if empty, nothing is inserted
intiIndexthe 0-based index the content should be inserted at; for a negative value of iIndex, the content is inserted at position 0; for a value greater than the current size of the aggregation, the content is inserted at the last position
Returns:
sap.m.PopoverReference to this in order to allow method chaining
isOpen(): boolean
The method checks if the Popover is open. It returns true when the Popover is currently open (this includes opening and closing animations), otherwise it returns false.
Returns:
booleanwhether the Popover is currently opened
Since:
1.9.1
openBy(oControl, bSkipInstanceManager): sap.m.Popover
Opens the Popover and set the Popover position according to the placement property around the oControl parameter.
Parameters:
objectoControlThis is the control to which the Popover will be placed. It can be not only a UI5 control, but also an existing DOM reference. The side of the placement depends on the placement property set in the Popover.
booleanbSkipInstanceManager
Returns:
sap.m.PopoverReference to the control instance for chaining
removeAllAriaDescribedBy(): sap.ui.core.ID[]
Removes all the controls in the association named ariaDescribedBy.
Returns:
sap.ui.core.ID[]An array of the removed elements (might be empty)
removeAllAriaLabelledBy(): sap.ui.core.ID[]
Removes all the controls in the association named ariaLabelledBy.
Returns:
sap.ui.core.ID[]An array of the removed elements (might be empty)
removeAllContent(): sap.ui.core.Control[]

Removes all the controls from the aggregation content.

Additionally, it unregisters them from the hosting UIArea.

Returns:
sap.ui.core.Control[]An array of the removed elements (might be empty)
removeAriaDescribedBy(vAriaDescribedBy): sap.ui.core.ID
Removes an ariaDescribedBy from the association named ariaDescribedBy.
Parameters:
int|sap.ui.core.ID|sap.ui.core.ControlvAriaDescribedByThe ariaDescribedBy to be removed or its index or ID
Returns:
sap.ui.core.IDThe removed ariaDescribedBy or null
removeAriaLabelledBy(vAriaLabelledBy): sap.ui.core.ID
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Parameters:
int|sap.ui.core.ID|sap.ui.core.ControlvAriaLabelledByThe ariaLabelledBy to be removed or its index or ID
Returns:
sap.ui.core.IDThe removed ariaLabelledBy or null
removeContent(vContent): sap.ui.core.Control
Removes a content from the aggregation content.
Parameters:
int|string|sap.ui.core.ControlvContentThe content to remove or its index or id
Returns:
sap.ui.core.ControlThe removed content or null
setBeginButton(oBeginButton): sap.m.Popover
Sets the aggregated beginButton.
Parameters:
sap.ui.core.ControloBeginButtonThe beginButton to set
Returns:
sap.m.PopoverReference to this in order to allow method chaining
Since:
1.15.1
setBounce(bBounce): sap.m.Popover

Setter for property bounce.

Default value is empty

Parameters:
booleanbBounceNew value for property bounce
Returns:
sap.m.PopoverReference to the control instance for chaining
setContentHeight(sContentHeight): sap.m.Popover

Sets a new value for property contentHeight.

Set the height of the content area inside Popover. When controls which adapt their size to the parent control are added directly into Popover, for example sap.m.Page control, a size needs to be specified to the content area of the Popover. Otherwise, Popover control isn't able to display the content in the right way. This values isn't necessary for controls added to Popover directly which can decide their size by themselves, for exmaple sap.m.List, sap.m.Image etc., only needed for controls that adapt their size to the parent control.

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
sap.ui.core.CSSSizesContentHeightNew value for property contentHeight
Returns:
sap.m.PopoverReference to this in order to allow method chaining
Since:
1.9.0
setContentMinWidth(sContentMinWidth): sap.m.Popover

Sets a new value for property contentMinWidth.

Sets the minimum width of the content area inside popover.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is .

Parameters:
sap.ui.core.CSSSizesContentMinWidthNew value for property contentMinWidth
Returns:
sap.m.PopoverReference to this in order to allow method chaining
Since:
1.36
setContentWidth(sContentWidth): sap.m.Popover

Sets a new value for property contentWidth.

Set the width of the content area inside Popover. When controls which adapt their size to the parent control are added directly into Popover, for example sap.m.Page control, a size needs to be specified to the content area of the Popover. Otherwise, Popover control isn't able to display the content in the right way. This values isn't necessary for controls added to Popover directly which can decide their size by themselves, for exmaple sap.m.List, sap.m.Image etc., only needed for controls that adapt their size to the parent control.

When called with a value of null or undefined, the default value of the property will be restored.

Parameters:
sap.ui.core.CSSSizesContentWidthNew value for property contentWidth
Returns:
sap.m.PopoverReference to this in order to allow method chaining
Since:
1.9.0
setCustomHeader(oCustomHeader): sap.m.Popover
Sets the aggregated customHeader.
Parameters:
sap.ui.core.ControloCustomHeaderThe customHeader to set
Returns:
sap.m.PopoverReference to this in order to allow method chaining
setEndButton(oEndButton): sap.m.Popover
Sets the aggregated endButton.
Parameters:
sap.ui.core.ControloEndButtonThe endButton to set
Returns:
sap.m.PopoverReference to this in order to allow method chaining
Since:
1.15.1
setFollowOf(bValue): sap.m.Popover

The followOf feature closes the Popover when the position of the control that opened the Popover changes by at least 32 pixels (on desktop browsers). This may lead to unwanted closing of the Popover.

This function is for enabling/disabling the followOf feature.

Parameters:
booleanbValueEnables the followOf feature
Returns:
sap.m.PopoverReference to the control instance for chaining
Since:
1.16.8
setFooter(oFooter): sap.m.Popover
Sets the aggregated footer.
Parameters:
sap.ui.core.ControloFooterThe footer to set
Returns:
sap.m.PopoverReference to this in order to allow method chaining
setHorizontalScrolling(bHorizontalScrolling): sap.m.Popover

Sets a new value for property horizontalScrolling.

This property indicates if user can scroll horizontally inside popover when the content is bigger than the content area. However, when scrollable control (sap.m.ScrollContainer, sap.m.Page) is in the popover, this property needs to be set to false to disable the scrolling in popover in order to make the scrolling in the child control work properly. Popover detects if there's sap.m.NavContainer, sap.m.Page, or sap.m.ScrollContainer as direct child added to Popover. If there is, Popover will turn off scrolling by setting this property to false automatically ignoring the existing value of this property.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

Parameters:
booleanbHorizontalScrollingNew value for property horizontalScrolling
Returns:
sap.m.PopoverReference to this in order to allow method chaining
Since:
1.15.0
setInitialFocus(oInitialFocus): sap.m.Popover
Sets the associated initialFocus.
Parameters:
sap.ui.core.ID|sap.ui.core.ControloInitialFocusID of an element which becomes the new target of this initialFocus association; alternatively, an element instance may be given
Returns:
sap.m.PopoverReference to this in order to allow method chaining
Since:
1.15.0
setModal(bModal, sModalCSSClass?): sap.m.Popover

Setter for property modal. This overwrites the default setter of the property modal to avoid rerendering the whole popover control.

Default value is false

Parameters:
booleanbModalNew value for property modal.
stringsModalCSSClass?A CSS class (or space-separated list of classes) that should be added to the block layer.
Returns:
sap.m.PopoverReference to the control instance for chaining
setOffsetX(iOffsetX): sap.m.Popover

Sets a new value for property offsetX.

The offset for the popover placement in the x axis. It's with unit pixel.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 0.

Parameters:
intiOffsetXNew value for property offsetX
Returns:
sap.m.PopoverReference to this in order to allow method chaining
setOffsetY(iOffsetY): sap.m.Popover

Sets a new value for property offsetY.

The offset for the popover placement in the y axis. It's with unit pixel.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is 0.

Parameters:
intiOffsetYNew value for property offsetY
Returns:
sap.m.PopoverReference to this in order to allow method chaining
setPlacement(sPlacement): sap.m.Popover
Set the placement of the Popover.
Parameters:
sap.m.PlacementTypesPlacementThe position of the Popover
Returns:
sap.m.PopoverReference to the control instance for chaining
setResizable(bResizable): sap.m.Popover

Sets a new value for property resizable.

Whether resize option is enabled.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is false.

Parameters:
booleanbResizableNew value for property resizable
Returns:
sap.m.PopoverReference to this in order to allow method chaining
Experimental API:
since 1.36.4 Do not use directly on Popover while in experimental mode!
Since:
1.36.4
setShowArrow(bShowArrow): sap.m.Popover

Sets a new value for property showArrow.

Whether Popover arrow should be visible

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

Parameters:
booleanbShowArrowNew value for property showArrow
Returns:
sap.m.PopoverReference to this in order to allow method chaining
Since:
1.31
setShowHeader(bShowHeader): sap.m.Popover

Sets a new value for property showHeader.

If a header should be shown at the top of the popover.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

Parameters:
booleanbShowHeaderNew value for property showHeader
Returns:
sap.m.PopoverReference to this in order to allow method chaining
setSubHeader(oSubHeader): sap.m.Popover
Sets the aggregated subHeader.
Parameters:
sap.ui.core.ControloSubHeaderThe subHeader to set
Returns:
sap.m.PopoverReference to this in order to allow method chaining
Since:
1.15.1
setTitle(sTitle): sap.m.Popover

The setter of the title property.

If you want to show a header in the popover, don't forget to set the showHeader property to true.

Parameters:
stringsTitleThe title to be set
Returns:
sap.m.PopoverReference to the control instance for chaining
setVerticalScrolling(bVerticalScrolling): sap.m.Popover

Sets a new value for property verticalScrolling.

This property indicates if user can scroll vertically inside popover when the content is bigger than the content area. However, when scrollable control (sap.m.ScrollContainer, sap.m.Page) is in the popover, this property needs to be set to false to disable the scrolling in popover in order to make the scrolling in the child control work properly. Popover detects if there's sap.m.NavContainer, sap.m.Page, or sap.m.ScrollContainer as direct child added to Popover. If there is, Popover will turn off scrolling by setting this property to false automatically ignoring the existing value of this property.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

Parameters:
booleanbVerticalScrollingNew value for property verticalScrolling
Returns:
sap.m.PopoverReference to this in order to allow method chaining
Since:
1.15.0
getEnableScrolling(): boolean

Gets current value of property enableScrolling.

This property is deprecated. Please use properties verticalScrolling and horizontalScrolling instead. If you still use this property it will be mapped on the new properties verticalScrolling and horizontalScrolling.

Default value is true.

Returns:
booleanValue of property enableScrolling
Deprecated API:
Since version 1.15.0. This property is deprecated. Please use properties verticalScrolling and horizontalScrolling instead. If you still use this property it will be mapped on the new properties verticalScrolling and horizontalScrolling.
getLeftButton(): sap.ui.core.ID
ID of the element which is the current target of the association leftButton, or null.
Returns:
sap.ui.core.ID
Deprecated API:

Since version 1.15.1.

This property has been deprecated since 1.15.1. Please use the beginButton instead.

getRightButton(): sap.ui.core.ID
ID of the element which is the current target of the association rightButton, or null.
Returns:
sap.ui.core.ID
Deprecated API:

Since version 1.15.1.

This property has been deprecated since 1.15.1. Please use the endButton instead.

setEnableScrolling(bEnableScrolling): sap.m.Popover

Sets a new value for property enableScrolling.

This property is deprecated. Please use properties verticalScrolling and horizontalScrolling instead. If you still use this property it will be mapped on the new properties verticalScrolling and horizontalScrolling.

When called with a value of null or undefined, the default value of the property will be restored.

Default value is true.

Parameters:
booleanbEnableScrollingNew value for property enableScrolling
Returns:
sap.m.PopoverReference to this in order to allow method chaining
Deprecated API:
Since version 1.15.0. This property is deprecated. Please use properties verticalScrolling and horizontalScrolling instead. If you still use this property it will be mapped on the new properties verticalScrolling and horizontalScrolling.
setLeftButton(oLeftButton): sap.m.Popover
Sets the associated leftButton.
Parameters:
sap.ui.core.ID|sap.m.ButtonoLeftButtonID of an element which becomes the new target of this leftButton association; alternatively, an element instance may be given
Returns:
sap.m.PopoverReference to this in order to allow method chaining
Deprecated API:

Since version 1.15.1.

This property has been deprecated since 1.15.1. Please use the beginButton instead.

setRightButton(oRightButton): sap.m.Popover
Sets the associated rightButton.
Parameters:
sap.ui.core.ID|sap.m.ButtonoRightButtonID of an element which becomes the new target of this rightButton association; alternatively, an element instance may be given
Returns:
sap.m.PopoverReference to this in order to allow method chaining
Deprecated API:

Since version 1.15.1.

This property has been deprecated since 1.15.1. Please use the endButton instead.