Displays additional information for an object in a compact way.
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.
The popover has three main areas:
The popover is closed when the user clicks or taps outside the popover or selects an action within the popover, which calls the popover's close()
method. You can prevent this with the modal
property. The popover can be resized when the resizable
property is enabled.
When using the sap.m.Popover in Sap Quartz theme, the breakpoints and layout paddings could be determined by the container's width. To enable this concept and add responsive paddings to an element of the Popover control, you may add the following classes depending on your use case: sapUiResponsivePadding--header
, sapUiResponsivePadding--subHeader
, sapUiResponsivePadding--content
, sapUiResponsivePadding--footer
.
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#constructor for a general description of the syntax of the settings object.
new sap.m.Popover(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 |
Name | Type | Default Value | Description |
---|---|---|---|
ariaModal | boolean | true | Specifies the aria-modal of the Popover. |
ariaRoleApplication | boolean | false | Specifies if the Popover should be set ARIA role 'application'. This property does not respect the avoidAriaApplicationRole core configuration, because it is expected to be used explicitly when role application is required for a specific Popover instance, no matter if the application role is present on the html body. Note: If this property should become public in the future, the property will have to be set on a level that will encapsulate the header and the footer of the popover as well. |
bounce | boolean | Whether bouncing is enabled. |
|
contentHeight | sap.ui.core.CSSSize | 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. |
|
contentMinWidth | sap.ui.core.CSSSize | empty string | Sets the minimum width of the content area inside popover. |
contentWidth | sap.ui.core.CSSSize | 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. |
|
enableScrolling | boolean | true | 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. Visibility: public |
horizontalScrolling | boolean | true | 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. |
modal | boolean | false | 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. Visibility: public |
offsetX | int | 0 | The offset for the popover placement in the x axis. It's with unit pixel. Visibility: public |
offsetY | int | 0 | The offset for the popover placement in the y axis. It's with unit pixel. Visibility: public |
placement | sap.m.PlacementType | Right | 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. Visibility: public |
resizable | boolean | false | Whether resize option is enabled. *Note:* This property is effective only on Desktop |
showArrow | boolean | true | Whether Popover arrow should be visible |
showHeader | boolean | true | If a header should be shown at the top of the popover. Visibility: public |
title | string | Title text appears in the header. This property will be ignored when |
|
titleAlignment | sap.m.TitleAlignment | Auto | Specifies the Title alignment (theme specific). If set to |
verticalScrolling | boolean | true | 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 Aggregation: content
Name | Cardinality | Type | Description |
---|---|---|---|
_internalHeader | 0..1 | sap.m.Bar |
This is the hidden aggregation for managing the internally created header. |
beginButton | 0..1 | sap.ui.core.Control |
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. |
content (default) | 0..n | sap.ui.core.Control |
The content inside the popover. |
customHeader | 0..1 | sap.ui.core.Control |
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. |
endButton | 0..1 | sap.ui.core.Control |
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. |
footer | 0..1 | sap.ui.core.Control |
This is optional footer which is shown on the bottom of the popover. |
subHeader | 0..1 | sap.ui.core.Control |
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. |
Name | Cardinality | Type | Description |
---|---|---|---|
ariaDescribedBy | 0..n | sap.ui.core.Control |
Association to controls / ids which describe this control (see WAI-ARIA attribute aria-describedby). |
ariaLabelledBy | 0..n | sap.ui.core.Control |
Association to controls / ids which label this control (see WAI-ARIA attribute aria-labelledby). |
initialFocus | 0..1 | sap.ui.core.Control |
Focus on the popover is set in the sequence of |
leftButton | 0..1 | sap.m.Button |
LeftButton is shown at the left edge of the bar in iOS, and at the right side of the bar for the other platforms. Please set this to null if you want to remove the left button from the bar. And the button is only removed from the bar, not destroyed. When showHeader is set to false, this property will be ignored. |
rightButton | 0..1 | sap.m.Button |
RightButton is always shown at the right edge of the bar. Please set this to null if you want to remove the right button from the bar. And the button is only removed from the bar, not destroyed. When showHeader is set to false, this property will be ignored. |
Event | Description |
---|---|
afterClose |
This event will be fired after the popover is closed. |
afterOpen |
This event will be fired after the popover is opened. |
beforeClose |
This event will be fired before the popover is closed. |
beforeOpen |
This event will be fired before the popover is opened. |
This event will be fired after the popover is closed.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
openBy | sap.ui.core.Control |
This refers to the control which opens the popover. |
This event will be fired after the popover is opened.
Param | Type | Description |
---|---|---|
oControlEvent | sap.ui.base.Event | |
getSource | sap.ui.base.EventProvider | |
getParameters | object | |
openBy | sap.ui.core.Control |
This refers to the control which opens the popover. |
Method | Description |
---|---|
_afterAdjustPositionAndArrowHook |
Hook called after adjusment of the Popover position. |
_beforeAdjustPositionAndArrowHook |
Hook called before adjusment of the Popover position. |
_getAnimationDuration |
Returns the duration for the Popover's closing animation. |
_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 |
Adds some ariaDescribedBy into the association ariaDescribedBy. |
addAriaLabelledBy |
Adds some ariaLabelledBy into the association ariaLabelledBy. |
addContent |
Adds some content to the aggregation content. |
attachAfterClose |
Attaches event handler When called, the context of the event handler (its This event will be fired after the popover is closed. |
attachAfterOpen |
Attaches event handler When called, the context of the event handler (its This event will be fired after the popover is opened. |
attachBeforeClose |
Attaches event handler When called, the context of the event handler (its This event will be fired before the popover is closed. |
attachBeforeOpen |
Attaches event handler When called, the context of the event handler (its This event will be fired before the popover is opened. |
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 |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachAfterOpen |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachBeforeClose |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
detachBeforeOpen |
Detaches event handler The passed function and listener object must match the ones used for event registration. |
sap.m.Popover.extend |
Creates a new subclass of class sap.m.Popover with name
|
fireAfterClose |
Fires event afterClose to attached listeners. |
fireAfterOpen |
Fires event afterOpen to attached listeners. |
fireBeforeClose |
Fires event beforeClose to attached listeners. |
fireBeforeOpen |
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. 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. |
getContent |
Gets content of aggregation content. The content inside the popover. |
getContentHeight |
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. |
getContentMinWidth |
Gets current value of property contentMinWidth. Sets the minimum width of the content area inside popover. Default value is |
getContentWidth |
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. |
getCustomHeader |
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. |
getEnableScrolling |
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
Since 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.
|
getEndButton |
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. |
getFooter |
Gets content of aggregation footer. This is optional footer which is shown on the bottom of the popover. |
getHorizontalScrolling |
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 |
getInitialFocus |
ID of the element which is the current target of the association initialFocus, or |
getLeftButton |
ID of the element which is the current target of the association leftButton, or
Since 1.15.1 This property has been deprecated since 1.15.1. Please use the beginButton instead.
|
sap.m.Popover.getMetadata |
Returns a metadata object for class sap.m.Popover. |
getModal |
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 |
getOffsetX |
Gets current value of property offsetX. The offset for the popover placement in the x axis. It's with unit pixel. Default value is |
getOffsetY |
Gets current value of property offsetY. The offset for the popover placement in the y axis. It's with unit pixel. Default value is |
getPlacement |
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 |
getResizable |
Gets current value of property resizable. Whether resize option is enabled. Note:* This property is effective only on Desktop Default value is |
getRightButton |
ID of the element which is the current target of the association rightButton, or
Since 1.15.1 This property has been deprecated since 1.15.1. Please use the endButton instead.
|
getShowArrow |
Gets current value of property showArrow. Whether Popover arrow should be visible Default value is |
getShowHeader |
Gets current value of property showHeader. If a header should be shown at the top of the popover. Default value is |
getSubHeader |
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. |
getTitle |
Gets current value of property title. Title text appears in the header. This property will be ignored when |
getTitleAlignment |
Gets current value of property titleAlignment. Specifies the Title alignment (theme specific). If set to Default value is |
getVerticalScrolling |
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 |
indexOfContent |
Checks for the provided |
insertContent |
Inserts a content into the aggregation content. |
isOpen |
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. |
openBy |
Opens the Popover and sets the Popover position according to the placement property around the |
sap.m.Popover.outerHeight |
Calculate outerHeight of the element; used as hook for SVG elements |
sap.m.Popover.outerWidth |
Calculate outerWidth of the element; used as hook for SVG elements |
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. Additionally, it unregisters them from the hosting UIArea. |
removeAriaDescribedBy |
Removes an ariaDescribedBy from the association named ariaDescribedBy. |
removeAriaLabelledBy |
Removes an ariaLabelledBy from the association named ariaLabelledBy. |
removeContent |
Removes a content from the aggregation content. |
setBeginButton |
Sets the aggregated beginButton. |
setBounce |
Setter for property Default value is empty |
setContentHeight |
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 |
setContentMinWidth |
Sets a new value for property contentMinWidth. Sets the minimum width of the content area inside popover. When called with a value of Default value is |
setContentWidth |
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 |
setCustomHeader |
Sets the aggregated customHeader. |
setEnableScrolling |
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 Default value is
Since 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.
|
setEndButton |
Sets the aggregated endButton. |
setFollowOf |
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. |
setFooter |
Sets the aggregated footer. |
setHorizontalScrolling |
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 Default value is |
setInitialFocus |
Sets the associated initialFocus. |
setLeftButton |
Sets the associated leftButton.
Since 1.15.1 This property has been deprecated since 1.15.1. Please use the beginButton instead.
|
setModal |
Setter for property Default value is |
setOffsetX |
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 Default value is |
setOffsetY |
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 Default value is |
setPlacement |
Set the placement of the Popover. |
setResizable |
Sets a new value for property resizable. Whether resize option is enabled. Note:* This property is effective only on Desktop When called with a value of Default value is |
setRightButton |
Sets the associated rightButton.
Since 1.15.1 This property has been deprecated since 1.15.1. Please use the endButton instead.
|
setShowArrow |
Sets a new value for property showArrow. Whether Popover arrow should be visible When called with a value of Default value is |
setShowHeader |
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 Default value is |
setSubHeader |
Sets the aggregated subHeader. |
setTitle |
Sets a new value for property title. Title text appears in the header. This property will be ignored when When called with a value of |
setTitleAlignment |
Sets a new value for property titleAlignment. Specifies the Title alignment (theme specific). If set to When called with a value of Default value is |
setVerticalScrolling |
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 Default value is |
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.
Adds some ariaDescribedBy into the association ariaDescribedBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaDescribedBy | sap.ui.core.ID sap.ui.core.Control |
The ariaDescribedBy to add; if empty, nothing is inserted |
Adds some ariaLabelledBy into the association ariaLabelledBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaLabelledBy | sap.ui.core.ID sap.ui.core.Control |
The ariaLabelledBy to add; if empty, nothing is inserted |
Adds some content to the aggregation content.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.core.Control |
The content to add; if empty, nothing is inserted |
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.
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 |
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.
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 |
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.
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 |
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.
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 |
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.
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 |
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.
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 |
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.
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 |
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.
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 |
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.
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 |
Fires event afterClose to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
openBy | sap.ui.core.Control |
This refers to the control which opens the popover. |
Fires event afterOpen to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
openBy | sap.ui.core.Control |
This refers to the control which opens the popover. |
Fires event beforeClose to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
openBy | sap.ui.core.Control |
This refers to the control which opens the popover. |
Fires event beforeOpen to attached listeners.
Param | Type | DefaultValue | Description |
---|---|---|---|
mParameters | object |
Parameters to pass along with the event |
|
openBy | sap.ui.core.Control |
This refers to the control which opens the popover. |
Returns array of IDs of the elements which are the current targets of the association ariaDescribedBy.
Returns array of IDs of the elements which are the current targets of the association ariaLabelledBy.
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.
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.
Gets current value of property contentMinWidth.
Sets the minimum width of the content area inside popover.
Default value is empty string
.
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.
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.
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
.
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.
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
.
ID of the element which is the current target of the association initialFocus, or null
.
ID of the element which is the current target of the association leftButton, or null
.
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
.
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
.
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
.
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
.
Gets current value of property resizable.
Whether resize option is enabled. Note:* This property is effective only on Desktop
Default value is false
.
ID of the element which is the current target of the association rightButton, or null
.
Gets current value of property showArrow.
Whether Popover arrow should be visible
Default value is true
.
Gets current value of property showHeader.
If a header should be shown at the top of the popover.
Default value is true
.
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.
Gets current value of property title.
Title text appears in the header. This property will be ignored when showHeader
is set to false
. If you want to show a header in the sap.m.Popover
, don't forget to set the showHeader property to true
.
Gets current value of property titleAlignment.
Specifies the Title alignment (theme specific). If set to TitleAlignment.Auto
, the Title will be aligned as it is set in the theme (if not set, the default value is center
); Other possible values are TitleAlignment.Start
(left or right depending on LTR/RTL), and TitleAlignment.Center
(centered)
Default value is Auto
.
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
.
Checks for the provided sap.ui.core.Control
in the aggregation content. and returns its index if found or -1 otherwise.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.core.Control |
The content whose index is looked for |
Inserts a content into the aggregation content.
Param | Type | DefaultValue | Description |
---|---|---|---|
oContent | sap.ui.core.Control |
The content to insert; if empty, nothing is inserted |
|
iIndex | int |
The |
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.
Opens the Popover and sets the Popover position according to the placement property around the oControl
parameter.
Param | Type | DefaultValue | Description |
---|---|---|---|
oControl | object |
This 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. |
|
bSkipInstanceManager | boolean |
Indicates whether popover should be managed by InstanceManager or not |
Calculate outerHeight of the element; used as hook for SVG elements
Param | Type | DefaultValue | Description |
---|---|---|---|
oElement | HTMLElement |
An Element for which outerHeight will be calculated. |
|
bIncludeMargin | boolean | false |
Determines if the margins should be included in the calculated outerHeight * @returns {number} The outer height of the element |
Calculate outerWidth of the element; used as hook for SVG elements
Param | Type | DefaultValue | Description |
---|---|---|---|
oElement | HTMLElement |
An Element for which outerWidth will be calculated |
|
bIncludeMargin | boolean | false |
Determines if the margins should be included in the calculated outerWidth |
Removes all the controls from the aggregation content.
Additionally, it unregisters them from the hosting UIArea.
Removes an ariaDescribedBy from the association named ariaDescribedBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaDescribedBy | int sap.ui.core.ID sap.ui.core.Control |
The ariaDescribedBy to be removed or its index or ID |
Removes an ariaLabelledBy from the association named ariaLabelledBy.
Param | Type | DefaultValue | Description |
---|---|---|---|
vAriaLabelledBy | int sap.ui.core.ID sap.ui.core.Control |
The ariaLabelledBy to be removed or its index or ID |
Removes a content from the aggregation content.
Param | Type | DefaultValue | Description |
---|---|---|---|
vContent | int string sap.ui.core.Control |
The content to remove or its index or id |
Sets the aggregated beginButton.
Param | Type | DefaultValue | Description |
---|---|---|---|
oBeginButton | sap.ui.core.Control |
The beginButton to set |
Setter for property bounce
.
Default value is empty
Param | Type | DefaultValue | Description |
---|---|---|---|
bBounce | boolean |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sContentHeight | sap.ui.core.CSSSize |
New value for property |
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 empty string
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sContentMinWidth | sap.ui.core.CSSSize | "" |
New value for property |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
sContentWidth | sap.ui.core.CSSSize |
New value for property |
Sets the aggregated customHeader.
Param | Type | DefaultValue | Description |
---|---|---|---|
oCustomHeader | sap.ui.core.Control |
The customHeader to set |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bEnableScrolling | boolean | true |
New value for property |
Sets the aggregated endButton.
Param | Type | DefaultValue | Description |
---|---|---|---|
oEndButton | sap.ui.core.Control |
The endButton to set |
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.
Param | Type | DefaultValue | Description |
---|---|---|---|
bValue | boolean |
Enables the followOf feature |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bHorizontalScrolling | boolean | true |
New value for property |
Sets the associated initialFocus.
Param | Type | DefaultValue | Description |
---|---|---|---|
oInitialFocus | sap.ui.core.ID sap.ui.core.Control |
ID of an element which becomes the new target of this initialFocus association; alternatively, an element instance may be given |
Sets the associated leftButton.
Param | Type | DefaultValue | Description |
---|---|---|---|
oLeftButton | sap.ui.core.ID sap.m.Button |
ID of an element which becomes the new target of this leftButton association; alternatively, an element instance may be given |
Setter for property modal
. This overwrites the default setter of the property modal
to avoid rerendering the whole popover control.
Default value is false
Param | Type | DefaultValue | Description |
---|---|---|---|
bModal | boolean |
New value for property |
|
sModalCSSClass | string |
A CSS class (or space-separated list of classes) that should be added to the block layer. |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iOffsetX | int | 0 |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
iOffsetY | int | 0 |
New value for property |
Set the placement of the Popover.
Param | Type | DefaultValue | Description |
---|---|---|---|
sPlacement | sap.m.PlacementType |
The position of the Popover |
Sets a new value for property resizable.
Whether resize option is enabled. Note:* This property is effective only on Desktop
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bResizable | boolean | false |
New value for property |
Sets the associated rightButton.
Param | Type | DefaultValue | Description |
---|---|---|---|
oRightButton | sap.ui.core.ID sap.m.Button |
ID of an element which becomes the new target of this rightButton association; alternatively, an element instance may be given |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowArrow | boolean | true |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bShowHeader | boolean | true |
New value for property |
Sets the aggregated subHeader.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSubHeader | sap.ui.core.Control |
The subHeader to set |
Sets a new value for property title.
Title text appears in the header. This property will be ignored when showHeader
is set to false
. If you want to show a header in the sap.m.Popover
, don't forget to set the showHeader property to true
.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTitle | string |
New value for property |
Sets a new value for property titleAlignment.
Specifies the Title alignment (theme specific). If set to TitleAlignment.Auto
, the Title will be aligned as it is set in the theme (if not set, the default value is center
); Other possible values are TitleAlignment.Start
(left or right depending on LTR/RTL), and TitleAlignment.Center
(centered)
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is Auto
.
Param | Type | DefaultValue | Description |
---|---|---|---|
sTitleAlignment | sap.m.TitleAlignment | Auto |
New value for property |
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
.
Param | Type | DefaultValue | Description |
---|---|---|---|
bVerticalScrolling | boolean | true |
New value for property |