JSMenuItem

Properties Summarized

Methods Summarized

Properties Detailed

callbackArguments

Set/Get the menu item callback arguments (for components that support this)

Type Array

Sample

menuItem.callbackArguments = [1];

enabled

Set/Get the menu item enabled state

Type Boolean

Sample

menuItem.enabled = false;

iconStyleClass

Set/Get the menu item space separated icon style classes

Type String

Sample

menu.iconStyleClass = 'fas fa-square';

itemID

The menu name (identifier)

Type String the name (identifier) of the menu item

Set/Get the menu item text

Type String

Sample

menuItem.menuText = 'Item 1';

styleClass

Set/Get the menu item space separated style classes

Type String

Sample

menu.styleClass = 'myclass';

tooltipText

Set/Get the menu item tooltip text

Type String

Sample

menuItem.tooltipText = 'my tooltip';

Methods Detailed

addSubMenuItem(id)

Adds a new menu item, as last item in the list.

Parameters

  • String id the menu item identifier

Returns: JSMenuItem

Sample

var item = menuItem.addSubMenuItem('item1');

addSubMenuItem(id, index)

Adds a new menu item, at a specific position.

Parameters

  • String id the menu item identifier

  • Number index the index position in list (0 based)

Returns: JSMenuItem

Sample

var mnu = menu.addSubMenuItem('item1',0);

getExtraProperty(String, String)

Returns an extra property value.

Parameters

Returns: Object extra property value

Sample

menuItem.getExtraProperty('Sidenav','formName');

getSubMenuItem(id)

Gets a child menu item by identifier. Returns null if not found.

Parameters

  • String id the menu item identifier

Returns: JSMenuItem

Sample

var mnu = menuItem.getSubMenuItem('item1');

getSubMenuItemAt(index)

Gets a child menu item at index (0 based). Returns null if not found.

Parameters

  • Number index the menu item index among its sibblings

Returns: JSMenuItem

Sample

var mnu = menuItem.getSubMenuItemAt(0);

getSubMenuItems()

Returns all the child menus items, either created at design time or at runtime, in the order they will show up in user interface.

Returns: Array

Sample

var items = menuItem.getSubMenuItems();

removeSubMenuItem(menuItem)

Removes a menu item from children's list, returns true if element was found an removed

Parameters

Returns: Boolean

Sample

var success = menu.removeSubMenuItem(item);

removeSubMenuItem(id)

Removes a menu item with given id, returns true if element was found an removed

Parameters

  • String id the menu item identifier

Returns: Boolean

Sample

var success = menu.removeSubMenuItem('item1');

Last updated