0

How to load zul file from .jar

asked 2014-08-14 20:49:23 +0800

Janchiii gravatar image Janchiii
1 1

updated 2014-08-14 20:52:20 +0800

I have a problem with load a zul file from jar. First project "zk-utils" containing zul file in src/web/zul/pages/ui_text.zul. This project is used as jar in next project. In next project I have added jar file as dependency into pom.xml. I can use classes and methods from this jar, but zul file will not load (Error: Page not found: ~./ui_text.zul). I use to create file: Executions.createComponents("~./zul/pages/ui _text.zul" , null, null); Please help me solve this problem.

delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-08-15 13:34:08 +0800

Darksu gravatar image Darksu
1991 1 4

Hello Janchii,

You can find a good example on how to load a zul file from a jar in the following post:

http://forum.zkoss.org/question/23321/load-a-zul-from-inside-a-jar/

Basically, the searched zul-file must be inside a jar-file who is placed in the /WEB-INF/lib folder of your main web application.

And the java call can be done as:

Map<string, object=""> map = new HashMap<string, object="">(); map.put("item", new Customer()); Executions.createComponents("~./zul/pages/customer/customerCRUD.zul", null, map);

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: 2014-08-14 20:49:23 +0800

Seen: 24 times

Last updated: Aug 15 '14

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