about the event of menupopup

asked 2013-09-12 09:04:52 +0800

jerrylyj gravatar image jerrylyj
12 1

updated 2013-09-12 09:09:07 +0800

请问一下,我打算在menupopup元素的onOpen事件中添加判断,当判断不符合要求时,我想要使用 event.stopPropagation();来终止menupopup的显示。但是,不起作用。 该如何处理呢? code:

 <menupopup id="MenuLsbMain" >
             <attribute name="onOpen">
             <menuitem  label="查看" image="../../images/ToolBar/view.png">           </menuitem>          </menupopup>

but the menupopup always show

delete flag offensive retag edit

1 Answer

Sort by » oldest newest most voted

answered 2013-09-23 02:33:00 +0800

paowang gravatar image paowang
140 6

try event.getTarget().close();

see also: http://www.zkoss.org/javadoc/latest/zk/org/zkoss/zul/Popup.html#close())

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

1 follower



Asked: 2013-09-12 09:04:52 +0800

Seen: 9 times

Last updated: Sep 23 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More