0

bundle macro component in a jar

asked 2010-10-03 20:37:00 +0800

aktejo gravatar image aktejo
155 3

Can we wrap macro component in a jar ? where should we put the zul file in side classpath, how to access it's address?

delete flag offensive retag edit

3 Replies

Sort by ยป oldest newest

answered 2010-10-03 21:15:27 +0800

RyanWu gravatar image RyanWu
533 2
about.me/flyworld

you can add it to the lang-addon.xml of your jar

<component>
    <component-name>mycomp</component-name>    
    <component-class>com.mine.Mycomp</component-class>    
    <macro-uri>~./mine/mycomp.zul</macro-uri>    
</component>

and access it directly

<mycomp>

link publish delete flag offensive edit

answered 2010-10-03 23:02:28 +0800

aktejo gravatar image aktejo
155 3

cool,. I will try it, thanks,..

where should I put the lang-addon.xml in the classpath? is it inthe classpath root or,.. META-inf or some specific package? please let me know.

what if I have a re usable (zul), it has it's composer (subclass of Generic Forward Composer).
I suppose to bundle both file (zul and .java) in a jar.

Latter I will call this zul as a modal window:
Window winMdl = Executions.createComponents("zul_address_inside_jar",null,dataObject);

how could i refer to zul_address_inside_jar ,..

link publish delete flag offensive edit

answered 2010-10-03 23:48:02 +0800

RyanWu gravatar image RyanWu
533 2
about.me/flyworld

In project
zk.xml

<language-config>
    <addon-uri>/WEB-INF/lang-addon.xml</addon-uri>
  </language-config>

In Jar File
/metainfo/zk/lang-addon.xml

http://docs.zkoss.org/wiki/Component_Development_Tutorial

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: 2010-10-03 20:37:00 +0800

Seen: 227 times

Last updated: Oct 03 '10

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