0

Definitions in a separate File

asked 2006-04-25 11:09:15 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

By: nobody


I want to store definions (variables) for my application in a separate File.
The following doesn't work:
<include src="globals.zul"/>
<window title="${title}" border="normal">
Hello, World!
</window>

"globals.zul" contains:
<zscript>
String title = "Kalibrierung im Vakuumlabor"; </zscript>

What is the best way to do this? Thanks in advance.

...Rolf





delete flag offensive retag edit

1 Reply

Sort by ยป oldest newest

answered 2006-04-25 14:22:50 +0800

admin gravatar image admin
18691 1 10 130
ZK Team


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

By: henrichen

<include> would include globals.zul as a seperate page of the same desktop.
The including page and the included page are parallel to each other thus no way to access variable across that scope.

Since 1.2RC2, ZK has provied a new macro mechanism that would do inline-expansion.
Try following code:

<?component name="gg" macro-uri="globals.zul"?> <zk> <gg/> <window title="${title}" border="normal"> Hello, World!
</window>
</zk>


/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-04-25 11:09:15 +0800

Seen: 259 times

Last updated: Apr 25 '06

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