sap.ui.ux3.NavigationBar.extend(sClassName, oClassInfo?, FNMetaImpl?): function
Creates a new subclass of class sap.ui.ux3.NavigationBar 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:
{string} | sClassName | Name of the class being created |
{object} | oClassInfo? | Object literal with information about the class |
{function} | FNMetaImpl? | Constructor function for the metadata object; if not given, it defaults to sap.ui.core.ElementMetadata |
Returns:
{function} | Created class / constructor function |
Returns a metadata object for class sap.ui.ux3.NavigationBar.
Returns:
Adds some associatedItem into the association associatedItems
.
Parameters:
Returns:
Adds some item to the aggregation items
.
Parameters:
Returns:
Attaches event handler
fnFunction
to the
select
event of this
sap.ui.ux3.NavigationBar
.
When called, the context of the event handler (its this
) will be bound to oListener
if specified, otherwise it will be bound to this sap.ui.ux3.NavigationBar
itself.
Event is fired when an item is selected by the user
Parameters:
{object} | oData? | An application-specific payload object that will be passed to the event handler along with the event object when firing the event |
{function} | fnFunction | The function to be called when the event occurs |
{object} | oListener? | Context object to call the event handler with. Defaults to this sap.ui.ux3.NavigationBar itself |
Returns:
Destroys all the items in the aggregation items
.
Returns:
Detaches event handler
fnFunction
from the
select
event of this
sap.ui.ux3.NavigationBar
.
The passed function and listener object must match the ones used for event registration.
Parameters:
{function} | fnFunction | The function to be called, when the event occurs |
{object} | oListener | Context object on which the given function had to be called |
Returns:
fireSelect(mArguments?): boolean
Fires event
select
to attached listeners.
Listeners may prevent the default action of this event by using the preventDefault
-method on the event object.
Expects the following event parameters:
itemId
of type string
The ID of the newly selected NavigationItem.item
of type sap.ui.ux3.NavigationItem
The newly selected NavigationItem.
Parameters:
{Map} | mArguments? | The arguments to pass along with the event |
Returns:
{boolean} | Whether or not to prevent the default action |
Returns array of IDs of the elements which are the current targets of the association associatedItems
.
Returns:
Gets content of aggregation
items
.
If the navigation items need to have a different parent than the NavigationBar, alternatively the associatedItems association can be used. The NavigationBar follows the approach to use the items aggregation. If this aggregation is empty, associatedItems is used.
Returns:
getOverflowItemsToUpperCase(): boolean
Gets current value of property
overflowItemsToUpperCase
.
Sets the appearance of the menu items in the overflow menu to uppercase
Default value is false
.
- Since:
- 1.36
Returns:
{boolean} | Value of property overflowItemsToUpperCase |
ID of the element which is the current target of the association selectedItem
, or null
.
Returns:
getToplevelVariant(): boolean
Gets current value of property
toplevelVariant
.
Defines whether the navigation bar shall have top-level appearance
Default value is false
.
Returns:
{boolean} | Value of property toplevelVariant |
indexOfItem(oItem): int
Checks for the provided sap.ui.ux3.NavigationItem
in the aggregation items
. and returns its index if found or -1 otherwise.
Parameters:
Returns:
{int} | The index of the provided control in the aggregation if found, or -1 otherwise |
Inserts a item into the aggregation items
.
Parameters:
{sap.ui.ux3.NavigationItem} | oItem | the item to insert; if empty, nothing is inserted |
{int} | iIndex | the 0 -based index the item should be inserted at; for a negative value of iIndex , the item is inserted at position 0; for a value greater than the current size of the aggregation, the item is inserted at the last position |
Returns:
isSelectedItemValid(): boolean
Returns whether there is a selectedItem set which is actually present in the items aggregation; or, if the aggregation is empty, in the associatedItems association.
Returns:
Removes all the controls in the association named associatedItems
.
Returns:
Removes all the controls from the aggregation
items
.
Additionally, it unregisters them from the hosting UIArea.
Returns:
Removes an associatedItem from the association named associatedItems
.
Parameters:
Returns:
Removes a item from the aggregation items
.
Parameters:
Returns:
Replaces the currently associated items with the ones in the given array
Parameters:
Returns:
Sets a new value for property
overflowItemsToUpperCase
.
Sets the appearance of the menu items in the overflow menu to uppercase
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bOverflowItemsToUpperCase | New value for property overflowItemsToUpperCase |
- Since:
- 1.36
Returns:
Sets the associated selectedItem
.
Parameters:
{sap.ui.ux3.NavigationItem} | oSelectedItem | Id of an element which becomes the new target of this selectedItem association; alternatively, an element instance may be given |
Returns:
Sets a new value for property
toplevelVariant
.
Defines whether the navigation bar shall have top-level appearance
When called with a value of null
or undefined
, the default value of the property will be restored.
Default value is false
.
Parameters:
{boolean} | bToplevelVariant | New value for property toplevelVariant |
Returns: