Modifying default behavior of menu in visual perspectives

The idea here is very similar. You have two scripts available – initialization and render scripts. The initialization script has a chance to modify the configuration of the menu widgets (almost all menu types except Plain List are implemented by their own Kendo UI widget (see the table below). The render script can call the methods of the widget once it has been drawn.

The following objects are exposed to the initialization script:

  • “config” – this object represents Kendo UI configuration of the menu widget
  • “parser” – the controller object (AwareApp_VPParser) – see the code in the file AwareIM/Tomcat/webapps/AwareIM/aware_kendo/parsers/vpParser.js

For example to add some custom menu item to a toolbar menu you could write the following script:

config.items.push ({
    type: "button",
    spriteCssClass: "fa fa-edit",
    text:  "My Menu Item",
    click: function () {
    alert ("this is my menu item");
 }
});
  • Last modified: 2023/04/05 07:12