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?