Displays the titles of the sections and subsections in the ObjectPageLayout and allows the user to scroll to the respective content.
The AnchorBar
is internally generated as a menu in the ObjectPageLayout
. It displays the sections and subsections and allows the user to directly scroll to the respective content by selecting them, while it remains visible at the top of the page (below the page header).
Constructor for a new AnchorBar
.
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.uxap.AnchorBar(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 |
---|---|---|---|
backgroundDesign | sap.m.BackgroundDesign | Determines the background color of the Note: The default value of |
|
showPopover | boolean | true | Determines whether to show a Popover with Subsection links when clicking on Section links in the Anchor bar. Visibility: public |
upperCase | boolean | false | Determines whether the Anchor bar items are displayed in upper case. Visibility: public |
Default Aggregation:
Name | Cardinality | Type | Description |
---|---|---|---|
_scrollArrowLeft | 0..1 | sap.ui.core.Control | |
_scrollArrowRight | 0..1 | sap.ui.core.Control | |
_select | 0..1 | sap.uxap.HierarchicalSelect |
Name | Cardinality | Type | Description |
---|---|---|---|
selectedButton | 0..1 | sap.m.Button |
The button that represents the Section being scrolled by the user. |
Method | Description |
---|---|
enhanceAccessibilityState |
This method is a hook for the RenderManager that gets called during the rendering of child Controls. It allows to add, remove and update existing accessibility attributes (ARIA) of those controls. |
sap.uxap.AnchorBar.extend |
Creates a new subclass of class sap.uxap.AnchorBar with name
|
getBackgroundDesign |
Gets current value of property backgroundDesign. Determines the background color of the Note: The default value of |
sap.uxap.AnchorBar.getMetadata |
Returns a metadata object for class sap.uxap.AnchorBar. |
getScrollDelegate |
Returns an sap.ui.core.delegate.ScrollEnablement object used to handle scrolling. |
getSelectedButton |
ID of the element which is the current target of the association selectedButton, or |
getShowPopover |
Gets current value of property showPopover. Determines whether to show a Popover with Subsection links when clicking on Section links in the Anchor bar. Default value is |
getUpperCase |
Gets current value of property upperCase. Determines whether the Anchor bar items are displayed in upper case. Default value is |
scrollToSection |
Scroll to a specific Section. |
setBackgroundDesign |
Sets a new value for property backgroundDesign. Determines the background color of the Note: The default value of When called with a value of |
setSelectedButton |
Sets the associated selectedButton. |
setShowPopover |
Sets a new value for property showPopover. Determines whether to show a Popover with Subsection links when clicking on Section links in the Anchor bar. When called with a value of Default value is |
setUpperCase |
Sets a new value for property upperCase. Determines whether the Anchor bar items are displayed in upper case. When called with a value of Default value is |
This method is a hook for the RenderManager that gets called during the rendering of child Controls. It allows to add, remove and update existing accessibility attributes (ARIA) of those controls.
Param | Type | DefaultValue | Description |
---|---|---|---|
oElement | sap.ui.core.Control |
The Control that gets rendered by the RenderManager |
|
mAriaProps | object |
The mapping of "aria-" prefixed attributes |
Creates a new subclass of class sap.uxap.AnchorBar with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.m.Toolbar.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 |
Gets current value of property backgroundDesign.
Determines the background color of the AnchorBar
.
Note: The default value of backgroundDesign
property is null. If the property is not set, the color of the background is @sapUiObjectHeaderBackground
, which depends on the specific theme.
ID of the element which is the current target of the association selectedButton, or null
.
Gets current value of property showPopover.
Determines whether to show a Popover with Subsection links when clicking on Section links in the Anchor bar.
Default value is true
.
Gets current value of property upperCase.
Determines whether the Anchor bar items are displayed in upper case.
Default value is false
.
Scroll to a specific Section.
Param | Type | DefaultValue | Description |
---|---|---|---|
sId | string |
The Section ID to scroll to |
|
iDuration | int | 0 |
Scroll duration (in ms) |
Sets a new value for property backgroundDesign.
Determines the background color of the AnchorBar
.
Note: The default value of backgroundDesign
property is null. If the property is not set, the color of the background is @sapUiObjectHeaderBackground
, which depends on the specific theme.
When called with a value of null
or undefined
, the default value of the property will be restored.
Param | Type | DefaultValue | Description |
---|---|---|---|
sBackgroundDesign | sap.m.BackgroundDesign |
New value for property |
Sets the associated selectedButton.
Param | Type | DefaultValue | Description |
---|---|---|---|
oSelectedButton | sap.ui.core.ID sap.m.Button |
ID of an element which becomes the new target of this selectedButton association; alternatively, an element instance may be given |
Sets a new value for property showPopover.
Determines whether to show a Popover with Subsection links when clicking on Section links in the Anchor bar.
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 |
---|---|---|---|
bShowPopover | boolean | true |
New value for property |
Sets a new value for property upperCase.
Determines whether the Anchor bar items are displayed in upper case.
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 |
---|---|---|---|
bUpperCase | boolean | false |
New value for property |