Interface DynamicMenuItemControl

All Superinterfaces:
Control, Element, EventOwner, MenuItemControl, MessageContainer, MessageProperties, java.io.Serializable, WebFormEventOwner

public interface DynamicMenuItemControl
extends MenuItemControl
A Dynamic Menu Item Control represents a location in a menu where any number of menu items are to be inserted at runtime.

Further documentation

Since:
V4.4
  • Method Details

    • setModel

      void setModel​(java.lang.String model)
      Sets the model representing the dynamic menu stucture to be added to the parent menu, where model is an XML string containing a structure of menu items.

      Further documentation

      Javascript examples:

       // 1. build menu XML from table using velocity 
       var menuxml = VelocityServices.invokeTemplateFromFile("menutest.vm");
       controls.DYN1.setModel(menuxml);
       // 2. build menu XML using the E4X API 
       var itemid, itemtext, menuitem;
       itemid = "item1";
       itemtext = "Item 1";
       var menuxml = <menu></menu>;
       menuitem = <menuitem></menuitem>;
       menuitem.appendChild(<itemname>{itemid}</itemname>);
       menuitem.appendChild(<text>{itemtext}</text>);
       menuxml.appendChild(menuitem);
       itemid = "item2";
       itemtext = "Item 2";
       menuitem = <menuitem></menuitem>;
       menuitem.appendChild(<itemname>{itemid}</itemname>);
       menuitem.appendChild(<text>{itemtext}</text>);
       menuxml.appendChild(menuitem);
       controls.DYN1.setModel(menuxml.toXMLString());
       
      Parameters:
      model - XML document in String format containing a structure of menu items
      Since:
      V4.5.3