Quantcast
Channel: Zimbra :: Forums - Zimlets
Viewing all articles
Browse latest Browse all 171

How to bind event listener to action menu item created with JS?

$
0
0
Hello,

I'm trying to build context menu for my zimlet panel item with javascript. Here is the code:

Code:

var ctxtMenu = this.getZimletContext().getPanelActionMenu();
ctxtMenu.createMenuItem("item1", {"text":"Menu Item 1});

Menu items appear in the menu but they appear not to be bound to menu selection event listener as ones defined in zimlet definition file (XML). In other words menuItemSelected() method is not called when generated by JS menu items are selected.

How to bind the event listener to dynamicly added items?

Viewing all articles
Browse latest Browse all 171