-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3697293
By: nobody
When I press the first button, it executes fine, but the second button doesn't.
How to fix this problem? Thank you
<?taglib uri="/WEB-INF/tld/zul/core.dsp.tld" prefix="u" ?> <html xmlns:x="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
xmlns:zk="http://www.potix.com/2005/zk">
<head>
<title>ZHTML Demo</title>
</head>
<body>
<x:window id="main" title="HTML App">
<zk:zscript>
import com.potix.zul.html.*;
void CreateNewWindow() { //running at the server
Window win = new Window();
win.setTitle("allala");
win.setWidth("200px");
win.setHeight("150px");
win.setClosable(true);
win.setBorder("normal");
win.setParent(main);
win.doOverlapped();
}
</zk:zscript>
<x:button label="Button 1" zk:onClick="CreateNewWindow()"/>
<x:window id="sub" title="sub">
<x:button label="Button 2" zk:onClick="CreateNewWindow()"/>
</x:window>
</x:window>
</body>
</html>
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3697308
By: henrichen
Try the latest nightly. It was fixed.
/henri
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3697317
By: henrichen
The old spec limit the zscript's scope at the IdSpace (to avoid method and variable name pollution). The new spec would traverse upward along the IdSpace to find the method or variable with the name.
In your example, the "subwindow" is another IdSpace and I guess you are using some older version :)( Sorry, I cannot remember when this spec. is changed).
I have tried your example on my local server and it works without problem.
/henri
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3697342
By: nobody
Thank you for your immediate response. I tried latest nightly and it works now.
Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=3697361
By: henrichen
Gald to know the problem solved.
/henri
Asked: 2006-04-21 09:18:37 +0800
Seen: 289 times
Last updated: Apr 21 '06