Menuitem"

From Documentation
m
Line 3: Line 3:
 
= Menuitem =
 
= Menuitem =
  
*Demonstration:  
+
*Demonstration: N/A
 
*Java API: <javadoc>org.zkoss.zul.Menuitem</javadoc>
 
*Java API: <javadoc>org.zkoss.zul.Menuitem</javadoc>
 
*JavaScript API: <javadoc directory="jsdoc">zul.menu.Menuitem</javadoc>
 
*JavaScript API: <javadoc directory="jsdoc">zul.menu.Menuitem</javadoc>
Line 51: Line 51:
 
! Version !! Description !! Example Location
 
! Version !! Description !! Example Location
 
|-
 
|-
| 5.0+
+
| &nbsp;
 
| &nbsp;
 
| &nbsp;
 
| &nbsp;
 
| &nbsp;
Line 61: Line 61:
 
! Version !! Date !! Content
 
! Version !! Date !! Content
 
|-
 
|-
| 5.0.1
+
| 5.0.2
 
| 05/11/2010
 
| 05/11/2010
 
| Initialization
 
| Initialization

Revision as of 04:09, 14 May 2010

Menuitem

Employment/Purpose

A single choice in a Menupopup element. It acts much like a button but it is rendered on a menu. Default getZclass(): z-menu-item . (since 3.5.0)

Example

File:Menu.png

 <menu label="File">
     <menupopup>
         <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>

Supported events

Name
Event Type
onClick
[#MouseEvent org.zkoss.zk.ui.event.MouseEvent]

Description: A menu command is associated with a menu item. There are two ways to associate a command to it: the onClick event and the href property. If a event listener is added for a menu item for the onClick event, the listener is invoked when the item is clicked.


Supported Children

*NONE

Use cases

Version Description Example Location
     

Version History

Version Date Content
5.0.2 05/11/2010 Initialization



Last Update : 2010/05/14

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