0

How to call *.zul file from index.zul

asked 2016-11-18 02:07:06 +0800

barcvilla gravatar image barcvilla
3 1

updated 2016-11-18 02:25:35 +0800

Hi community

I have the following structure in my project:

  1. essentials
  2. 1.1 WebContent
  3. 1.1.1 css
  4. 1.1.2 imgs
  5. 1.1.3 META-INF
  6. 1.1.4 WEB.INF
  7. 1.1.5 webapp
  8. 1.1.5.1 chapter3
  9. 1.1.5.1.1 banner.zul
  10. 1.1.5.1.2 footer.zul
  11. 1.1.5.1.3 main.zul
  12. 1.1.5.1.4 sidebar.zul
  13. 1.1.6 index.zul
  14. 1.1.7 timeout.zul

source code to call *.zul files in index.zul file is:

<include src="/webapp/chapter3/banner.zul"/>

what I have to do or change in my code for call .zul files from webapp folder?

thanks in advanced

delete flag offensive retag edit

Comments

but webapp was a folder that I have created, i mean was not included in the original project structure. The structure created is: webapp -->chapter3--> banner.zul, footer.zul, main.zul, sidebar.zul

barcvilla ( 2016-11-27 15:35:01 +0800 )edit

Hi Hawk. I moved timeout.zul file to webapp/chapter3 and try to call it <include src="/webapp/chapter3/timeout.zul"/> and it works!!!. But doesn´t work with I try call banner.zul. I have a error proceessing request: org.zkoss.zk.ui.metainfo.PropertyNotFoundException: Method setRef not found for clas

barcvilla ( 2016-12-02 13:01:10 +0800 )edit

3 Answers

Sort by » oldest newest most voted
0

answered 2016-11-21 03:18:36 +0800

hawk gravatar image hawk
3250 1 5
http://hawkphoenix.blogsp... ZK Team

updated 2016-12-01 04:05:33 +0800

The correct path is <include src="/chapter3/banner.zul"/> webapp is the root folder.

If you are using zk 8 or above, I suggest using <apply templateURI="/chapter3/banner.zul"/>

link publish delete flag offensive edit
0

answered 2016-12-01 04:13:31 +0800

hawk gravatar image hawk
3250 1 5
http://hawkphoenix.blogsp... ZK Team

Look the structure again and found some issues. just confused by the naming, webapp Your project structure is incorrect. If webapp is your application context root, then there should be a WEB-INF under it. But I just see a WEB.INF in webapp's parent folder.

If WebContent is the application context root, then the included zul URL is <include src="/webapp/chapter3/banner.zul"/>

ref: web module

link publish delete flag offensive edit
0

answered 2016-11-21 08:33:08 +0800

Darksu gravatar image Darksu
1991 1 4

Hello barcvilla,

You can also refer to this post to get more information on the topic:

http://stackoverflow.com/questions/14489016/how-to-properly-reference-local-resources-in-html

Best Regards,

Darksu

link publish delete flag offensive edit
Your answer
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
1 follower

RSS

Stats

Asked: 2016-11-18 02:07:06 +0800

Seen: 59 times

Last updated: Dec 01 '16

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