Call a java function included in another zul file

asked 2011-02-22 03:30:36 +0800

afxgroup gravatar image afxgroup
126 2

I have this problem. I want to create a global zul file that contains a function that is used in many other zul files. For example:

			public void loadNavigatorPage(String sUrl) {
				desktop.getPage("index").setAttribute("navigatorindex", "");
				Include inc = (Include) Path.getComponent("//index/navigator/");

then, i want to include it with <include src="/mypage.zul" /> in any file that should use it. But the function is not found by the pages. Is this possible or i must create a class in a package and then use it?

Thank you

delete flag offensive retag edit

2 Replies

Sort by ยป oldest newest

answered 2011-02-23 01:40:06 +0800

woodyki gravatar image woodyki

You can put all functions into a .zs then use the tag <zscript src="/myscript.zs" />

link publish delete flag offensive edit

answered 2011-02-23 05:38:43 +0800

afxgroup gravatar image afxgroup
126 2

updated 2011-02-23 06:30:01 +0800

Sorry, but i don't see any "src" property in <zscript> tag..

It is possible i have an old version of zk installed..

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




Asked: 2011-02-22 03:30:36 +0800

Seen: 249 times

Last updated: Feb 23 '11

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