Menupopup"

From Documentation
m
Line 6: Line 6:
 
*Java API: <javadoc>org.zkoss.zul.Menupopup</javadoc>
 
*Java API: <javadoc>org.zkoss.zul.Menupopup</javadoc>
 
*JavaScript API: <javadoc directory="jsdoc">zul.menu.Menupopup</javadoc>
 
*JavaScript API: <javadoc directory="jsdoc">zul.menu.Menupopup</javadoc>
*Style Guide: [http://books.zkoss.org/wiki/ZK_Style_Guide/XUL_Component_Specification/Menupopup Menupopup]
+
*Style Guide: [[ZK_Style_Guide/XUL_Component_Specification/Menupopup| Menupopup]]
 
= Employment/Purpose =
 
= Employment/Purpose =
  

Revision as of 08:33, 19 January 2011

Menupopup

Employment/Purpose

A container used to display menus. It should be placed inside a Menu.

Supported event: onOpen.

Note: to have better performance, onOpen is sent only if non-deferrable event listener is registered (see Deferrable).

To load the content dynamically, you can listen to the onOpen event, and then create menuitem when OpenEvent.isOpen() is true.

Default HtmlBasedComponent.getSclass(): menupopup.


Example

ZKComRef Menubar.png


<menubar id="menubar">
	<menu label="File">
		<menupopup onOpen="alert(self.id)">
			<menuitem label="New" onClick="alert(self.label)" />
			<menuitem label="Open" onClick="alert(self.label)" />
			<menuitem label="Save" onClick="alert(self.label)" />
			<menuseparator />
			<menuitem label="Exit" onClick="alert(self.label)" />
		</menupopup>
	</menu>
	<menu label="Help">
		<menupopup>
			<menuitem label="Index" onClick="alert(self.label)" />
			<menu label="About">
				<menupopup>
					<menuitem label="About ZK" onClick="alert(self.label)" />
					<menuitem label="About Potix" onClick="alert(self.label)" />
				</menupopup>
			</menu>
		</menupopup>
	</menu>
</menubar>

Supported Events

Name
Event Type
None None
  • Inherited Supported Events: Popup

Supported Children

* Menu ,  Menuitem ,  Menuseparator

Use Cases

Version Description Example Location
     

Version History

Last Update : 2011/01/19


Version Date Content
     



Last Update : 2011/01/19

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.