0

Problem using ZK script in JSp

asked 2006-11-11 20:05:28 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4007261

By: raidenx112

I'm trying to call a simple ZK script inside a JSP page. My JSP page is as
follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<?taglib uri="/WEB-INF/tld/zul/core.dsp.tld" prefix="u" ?>

<html xmlns:x="http://www.zkoss.org/2005/zul"
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"
xmlns:h="http://www.w3.org/1999/xhtml">

<head>
<title>Quick Example</title>
<?page language="xhtml"?>
</head>
<body>
<h1> Quick Example
</h1>

<x:window id="login" border="normal" width="300px" left="300px" top="250px">
<p> Note that the layout (with tabs and alignment) is
purely for readability - XHTML doesn't require it.
</p>

<x:zscript>
login.doOverlapped();
</x:zscript>

</x:window>


</body>
</html>

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2006-11-11 21:14:27 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4007326

By: raidenx112

This is what I updated it to do:

JSP file:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

<html xmlns:zk="http://www.zkoss.org/2005/zul"
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"
xmlns:h="http://www.w3.org/1999/xhtml">

<head>
<title>Quick Example</title>
<?page language="xhtml"?>
</head>
<body>
<h1> Quick Example
</h1>

<zk:window id="login" border="normal" width="300px" left="300px" top="250px">
<zk:checkbox label="Hello, World!"/>
</zk:window>
<zscript>
<![CDATA[
login.doOverlapped();
]]>
</zscript>
</body>
</html>


Problem here is that when the ZK script is executed, the window becomes static in the middle of the page. I believe the doOverlapped() function was executed but I'm unable to move the window around. Is this just a limitation of the way I integrated ZK with JSP? The other way to do this would be to create a ZUL component and include it in the JSP. Thanks.


Jack

link publish delete flag offensive edit

answered 2006-11-12 09:01:37 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


Orignial message at:
https://sourceforge.net/forum/message.php?msg_id=4007639

By: henrichen

The overlapped window needs the title to be dragged around.

<zk:window id="login" ... title="login">

/henri

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: 2006-11-11 20:05:28 +0800

Seen: 473 times

Last updated: Nov 12 '06

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