Menupopup

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 .

<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>    

Class Name

org.zkoss.zul.Menupopup

Supported Child Components

Menu , Menuitem , Menuseparator

Supported Events

Event Name

Event Type

onOpen

org.zkoss.zk.ui.event.OpenEvent

Description: Denotes user has opened or closed a component.

Properties

*NONE

Methods

Name

Description

Return Data Type

getOuterAttrs()

String

insertBefore(org.zkoss.zk.ui.Component child, org.zkoss.zk.ui.Component insertBefore)

boolean

Inherited From