Navbar
(part of package 'Bootstrap Extra Components') Extends designtime/SolutionModel: JSWebComponent Extends runtime: RuntimeWebComponent
This is a reference page; many components have detailed usage guides here.
Properties
brandLogo
Type: media
brandLogoStyleClass
Type: styleclass
brandLogoTabindex
Type: string
brandText
Type: tagstring Default Value: ""
brandTextTabindex
Type: string
collapseOnClick
Type: boolean Default Value: true
collapsing
Type: boolean Default Value: false
fixed
Type: string Default Value: null
inverse
Type: boolean
location
Type: point
markClickedItemActive
Type: boolean
menuItems
Type: menuItem[]
servoyMenu
Type: JSMenu
styleClass
Type: styleclass
visible
Type: visible
Events
onBrandClicked
Called when the user clicks on the brand logo or text
Parameters:
event JSEvent
onMenuItemClicked
Called whenever a menu item is clicked or a submenu item is selected with the JSEvent and the menuItem object clicked on
Parameters:
API
addMenuItem
Adds the given menu item to the Navbar
@param {CustomType<bootstrapextracomponents-navbar.menuItem>} menuItem the menuItem to add @param {Number} [index] optional index where the item will be inserted
Parameters:
createMenuItem
Creates a new menuItem
@param {String} text the item's text @param {String} [itemId] optional ID to identify the item in scripting @param {String} [position] alignment of the item in the navbar as either LEFT or RIGHT @return {CustomType<bootstrapextracomponents-navbar.menuItem>}
Parameters:
text string itemId string (optional) position string (optional)
Returns: menuItem
getLocation
Retrieves the screen location of a specific navbar item. Returns the location as point (object with x and y properties).
@param {string} itemId the node to retrieve location for. @return {point} the location of the item.
Parameters:
itemId string
Returns: point
getMenuItem
Returns the menu item with the given ID or null if not found
@return {CustomType<bootstrapextracomponents-navbar.menuItem>}
Parameters:
itemId string
Returns: menuItem
getSelectedMenu
Returns the currently selected menu item
@return {CustomType<bootstrapextracomponents-navbar.menuItem>}
getSize
Retrieves the size of a specific navbar item. Returns the size as dimension (object with width and height properties).
@param {string} itemId the node to retrieve size for. @return {dimension} the size of the item.
Parameters:
itemId string
Returns: dimension
openSubMenu
Opens the submenu of the specified menu item.
Parameters:
itemId string
removeMenuItem
Removes the menu item with the given item ID
@param {String} menuItemId
Parameters:
itemId string
requestFocus
Sets focus on the passed element on the navbar
Parameters:
itemId string
setMenuItemEnabled
Enables or disables the menu with the given item ID
@param {String} menuItemId @param {Boolean} enabled
Parameters:
setMenuItems
Sets the menu items of the Navbar
@param {Array<CustomType<bootstrapextracomponents-navbar.menuItem>>} menuItems
Parameters:
menuItems menuItem[]
setMenuSelected
Sets the menu item with the given item ID to selected
@param {String} menuItemId
Parameters:
itemId string
setSubMenuItemEnabled
Enables or disables the submenu with the given item ID of the menu with the given item ID
@param {String} menuItemId @param {String} subMenuItemId @param {Boolean} enabled
Parameters:
Types
menuItem
scripting type: CustomType<bootstrapextracomponents-navbar.menuItem>
attributes
Type: map
dataProvider
Type: dataprovider
displayType
Type: string
Default Value: "MENU_ITEM"
enabled
Type: boolean
Default Value: true
iconName
Type: string
inputButtonStyleClass
Type: styleclass
inputButtonText
Type: tagstring
isActive
Type: boolean
Default Value: false
itemId
Type: string
onAction
Type: function
position
Type: string
Default Value: "LEFT"
styleClass
Type: styleclass
subMenuItems
Type: subMenuItem[]
tabindex
Type: string
text
Type: tagstring
tooltip
Type: tagstring
userData
Type: object
valuelist
Type: valuelist
subMenuItem
scripting type: CustomType<bootstrapextracomponents-navbar.subMenuItem>
enabled
Type: boolean
Default Value: true
iconName
Type: string
isDivider
Type: boolean
itemId
Type: string
onAction
Type: function
styleClass
Type: styleclass
tabindex
Type: string
text
Type: tagstring
userData
Type: object
Last updated