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();