0

Tip: If you want to disable browser's default context menu, you can set the context attribute of a c

asked 2009-12-12 00:01:04 +0800

dellsoft gravatar image dellsoft
114 2

document ,http://docs.zkoss.org/wiki/Toolbar_and_Menus

but it does not work

<?page id="loginw" title="Test"?>
<zk xmlns="http://www.zkoss.org/2005/zul"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd" >

<window id = "login" context="tt" closable="false" position="center" border="normal" mode="embedded" height="100%" width="100%">


</window>
</zk>

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2009-12-13 19:34:55 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

updated 2009-12-13 19:41:55 +0800

Hi,dellsoft
I try this demo

<?page id="loginw" title="Test"?>
<zk xmlns="http://www.zkoss.org/2005/zul"
xmlns:h="http://www.w3.org/1999/xhtml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.zkoss.org/2005/zul http://www.zkoss.org/2005/zul/zul.xsd" >

<window id = "login" context="editPopup" closable="false" position="center" border="normal" mode="embedded" height="100px" width="100px">

</window>

<menupopup id="editPopup">
	    <menuitem label="Undo"/>
	    <menuitem label="Redo"/>
 
	    <menu label="Sort">
	        <menupopup>
	            <menuitem label="Sort by Name" autocheck="true"/>
	            <menuitem label="Sort by Date" autocheck="true"/>
	        </menupopup>
	    </menu>
</menupopup>
 
<label value="Right Click Me!" context="editPopup"/>
	
</zk>

it is works well
which version of zk do you use ?
I test in FF 3.5
Which browser will happen ?

link publish delete flag offensive edit

answered 2009-12-14 00:58:57 +0800

dellsoft gravatar image dellsoft
114 2

i just want the window not show the mouse right click menu ? so i set the window context's id tt ,but the tt is does not exists

link publish delete flag offensive edit

answered 2009-12-14 19:06:18 +0800

jimmyshiau gravatar image jimmyshiau
4921 5
http://www.zkoss.org/ ZK Team

updated 2009-12-14 19:06:41 +0800

sorry
I misunderstanding what are you mean
you can try this

<zk>
	<menupopup id="editPopup">
	    <menuitem label="Undo"/>
	    <menuitem label="Redo"/>
 
	    <menu label="Sort">
	        <menupopup>
	            <menuitem label="Sort by Name" autocheck="true"/>
	            <menuitem label="Sort by Date" autocheck="true"/>
	        </menupopup>
	    </menu>
	</menupopup>
 	<popup  zclass="z-popup-plain" style="height:0;width:0;overflow:hidden" id="editPopup2"/>
	<label value="Right Click Me!" context="editPopup2"/>
	<separator bar="true"/>
	<label value="Right Click Me!" onRightClick="alert(self.value)"/>
</zk>

give an empty popup

link publish delete flag offensive edit

answered 2009-12-14 19:58:31 +0800

dellsoft gravatar image dellsoft
114 2

thanks , now it is ok

link publish delete flag offensive edit
Your reply
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

Follow

RSS

Stats

Asked: 2009-12-12 00:01:04 +0800

Seen: 1,027 times

Last updated: Dec 14 '09

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