Menuitem"

From Documentation
Line 16: Line 16:
 
= Example =
 
= Example =
  
[[Image:Menu.png]]
+
[[Image:ZKComRef_Menuitem.png]]
 
 
 
<source lang="xml" >
 
<source lang="xml" >
 +
<menubar>
 
  <menu label="File">
 
  <menu label="File">
 
     <menupopup>
 
     <menupopup>
Line 28: Line 28:
 
     </menupopup>
 
     </menupopup>
 
  </menu>
 
  </menu>
 +
<menuitem label="Home"/>
 +
</menubar>
 
</source>
 
</source>
  

Revision as of 04:24, 16 November 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 .

Within ZK 5, the file upload has been redesigned so it can be integrated with any widget. For example, The toolbarbutton can now be used to upload a file. In addition to this, the display of the upload status has been enhanced and can be customized easily.

Example

ZKComRef Menuitem.png

<menubar>
 <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>
 <menuitem label="Home"/>
</menubar>

Fileupload Example

<menuitem upload="true" label="Customized Attach" onUpload='alert("File is uploaded!")'/>


Supported events

Name
Event Type
onClick
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.

onUpload
UploadEvent

Description:

Denotes user has uploaded a file to the component.

Supported Children

*NONE

Use cases

Version Description Example Location
     

Version History

Version Date Content
     


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