0

Pack Composit Component into JAR?

asked 2013-06-29 15:28:23 +0800

kellern gravatar image kellern
1

Hi, I need to pack my composit component into a JAR so i can use it in another project.

I was practicing with the username component from ZK Example: Composite_Component

As explained in ZK example Packing_Code I put metainfo.zk package in my project and added lang-addon.xml and config.xml to it.

My project structure:

ZK_Project: - src - metainfo.zk - config.xml - lang-addon.xml - org.zkoss.composite - MyJARWebAppInit.java - org.zkoss.zul.composite - Username.java - web.zul.composite - username.zul

My lang-addon.xml:

<language-addon> <addon-name>myapp</addon-name> <language-name>xul/html</language-name>

<component>
    <component-name>username</component-name>
    <extends>row</extends>
    <component-class>org.zkoss.zul.composite.Username</component-class>
</component>

</language-addon>

My config.xml:

<config> <config-name>zkex</config-name> <depends>myapp</depends>

<listener>
    <listener-class>org.zkoss.composite.MyJARWebAppInit</listener-class>
</listener>

<language-config>
    <addon-uri>/metainfo/zk/lang-addon.xml</addon-uri>
</language-config>

</config>

I export the project as JAR-File and put it in the lib directory of the project b.

But when I use the username component in ther project b i get an error:

Component definition not found: username in [LanguageDefinition: xul/html]

My question ist: is it possible at all to bundle a composite component in a jar file to use accross zk projects and if so how exactley can i do it?

Thanx very much.

delete flag offensive retag edit
Be the first one to answer this question!
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: 2013-06-29 15:28:23 +0800

Seen: 12 times

Last updated: Jun 29 '13

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