-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I have 3 zul.
/index.zul
/base/page.zul
/base/menu.zul
index.zul
<zk> <include src="base/page.zul" /> </zk>
page.zul
<zk> <include src="/base/menu.zul" /> </zk>
I want to use path <include src="menu.zul" /> but it cause page not found. Is there any way to achieve?
Thanks,
Anthony
The reason this is not possible is because an include is not a call or redirect to another zul. You are actually copying the page.zul contents into the index.zul markup. When you use an include, you are treating the included page as a fragment to be inserted, and not as a separate page to which you are passing control. Since the contents of page.zul is being copied/inserted into index.zul, you never actually navigate away from index.zul and therefore you never actually leave the root directory, which is why page.zul cannot find menu.zul in the same directory. Your relative path must alway reflect the understanding that index.zul never loses control and everything must be seen from its perspective.
Ron
Asked: 2013-01-14 06:06:48 +0800
Seen: 47 times
Last updated: Jan 24 '13