-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I can't get the manager class extending GenericForwardComposer get onClick event from menupopup's menuitems...
With ZKEE-bin-5.0.5 the demo code at http://www.zkoss.org/zkdemo/menu/pull-down_menu does not prompt any popup :(((
<zk> <style>.z-menubar-hor, .z-menubar-ver { border: 1px solid #D8D8D8; }</style> <menubar id="menubar" width="100%" > <menu label="Project" image="/widgets/menu/pull-down_menu/img/luggage.png"> <menupopup> <menuitem label="New" onClick="alert(self.label)" image="/widgets/menu/pull-down_menu/img/report-paper.png" /> <menuitem label="Open" onClick="alert(self.label)" image="/widgets/menu/pull-down_menu/img/folder-horizontal-open.png" /> <menuitem label="Save" onClick="alert(self.label)" image="/widgets/menu/pull-down_menu/img/disk-black.png" /> <menuitem label="Exit" onClick="alert(self.label)" image="/widgets/menu/pull-down_menu/img/door-open-out.png" /> </menupopup> </menu> <menu label="Help" image="/widgets/menu/pull-down_menu/img/question.png"> <menupopup> <menuitem label="Bug Report" onClick="alert(self.label)" image="/widgets/menu/pull-down_menu/img/bug.png" /> <menu label="About"> <menupopup> <menuitem label="About Potix" image="/widgets/menu/pull-down_menu/img/information-white.png" onClick="alert(self.label)" /> </menupopup> </menu> </menupopup> </menu> <menu image="/widgets/menu/pull-down_menu/img/color.png"> <menupopup> <menu label="Color Picker 1" content="#color=#ff9933" /> <menu label="Color Picker 2" content="#color=#31548C" /> </menupopup> </menu> <menuitem label="ZK Web Framework" image="/images/zk16x16.png" onClick="alert(self.label)" /> </menubar> </zk>
Actually, the popup is prompted only for
<menuitem label="ZK Web Framework" image="/images/zk16x16.png" onClick="alert(self.label)" />
FOUND THE ISSUE!
I had this configuration in zk.xml:
<!-- Block request for inaccessible widgets for the whole application --> <listener> <listener-class>org.zkoss.zkmax.au.InaccessibleWidgetBlockService$DesktopInit</listener-class> </listener>
This actually prevents the onClick event on the menupopup's menuitem to be fired.
Maybe the behaviour is correct - I do not know this configuration's behaviour very well.
If you copy this configuration in a new project, the demo example included in index.zul does not work as well.
Hope it helps,
Sorry - I did not know the issue on the two posts was the same until I found out the problem - just wanted to "close" the thread for future readers.
Thanks for the feedback,
cheers
Stefano
Asked: 2011-02-10 04:03:11 +0800
Seen: 634 times
Last updated: Feb 11 '11