Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 3 Next »

This element is the root element for dropdowns

Custom Attributes

Name

Description

pen:binding

The get and set method to bind the menulist to

oncommand

The controller method to call when a user selects an element in the menu list

<menulist id="list" pen:binding="name">
    <menupopup>
        <menuitem label="Value 1" />
        <menuitem label="Value 2" />
    </menupopup>
</menulist>

Example binding, usually defined in a controller's init. This populates the menulist with the contents of the method getListItems() in the controller:

XulMenuList<String> list = (XulMenuList<String>) document.getElementById("list");
Binding b = bf.createBinding(this, "listItems", list, "elements");
b.fireSourceChanged();
  • No labels