Menupopup"

From Documentation
(Created page with '{{ZKComponentReferencePageHeader}} = Menupopup = *Demonstration: [http://www.zkoss.org/zkdemo/userguide/#t1 Menu] *Java API: <javadoc>org.zkoss.zul.Menupopup</javadoc> *JavaSc…')
 
m
Line 71: Line 71:
 
=Supported Children=
 
=Supported Children=
  
[[ZK_Component_Reference/Essential_Components/Menu | Menu ]], [[ZK_Component_Reference/Essential_Components/Menu/Menuitem | Menuitem ]], [[ZK_Component_Reference/Essential_Components/Menu/Menuseparator | Menuseparator]]
+
*[[ZK_Component_Reference/Essential_Components/Menu | Menu ]], [[ZK_Component_Reference/Essential_Components/Menu/Menuitem | Menuitem ]], [[ZK_Component_Reference/Essential_Components/Menu/Menuseparator | Menuseparator]]
  
 
=Use cases=
 
=Use cases=
Line 82: Line 82:
 
! Version !! Date !! Content
 
! Version !! Date !! Content
 
|-
 
|-
| 5.0.1
+
| 5.0.2
 
| 5/5/2010
 
| 5/5/2010
 
| Initialization
 
| Initialization

Revision as of 03:31, 14 May 2010

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

File:Menu.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

Event Name
Event Type
onOpen
[#OpenEvent org.zkoss.zk.ui.event.OpenEvent]

Description: Denotes user has opened or closed a component.

Supported Children

* Menu ,  Menuitem ,  Menuseparator

Use cases

Menu

Version History

Version Date Content
5.0.2 5/5/2010 Initialization



Last Update : 2010/05/14

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