Packing as a Jar"
From Documentation
(24 intermediate revisions by 3 users not shown) | |||
Line 3: | Line 3: | ||
== Jar Files == | == Jar Files == | ||
− | Packing a component as a Jar file will make it easy to deployment | + | Packing a component as a Jar file will make it easy to deployment. This article demonstrates the steps and requirements of it. |
+ | |||
+ | |||
+ | {| class="wikitable" | ||
+ | ! style="width: 70%" | | ||
+ | ! style="width: 30%" | | ||
+ | |- | ||
+ | | | ||
*Requirements of a component Jar | *Requirements of a component Jar | ||
*:Configurations | *:Configurations | ||
Line 9: | Line 16: | ||
*:Widget Resources | *:Widget Resources | ||
*:Static Resources | *:Static Resources | ||
+ | | | ||
+ | |||
+ | ''what do they look like , example from zul.jar'' | ||
+ | [[File:Jar_File_summary.jpg]] | ||
+ | |||
+ | |} | ||
== Configurations == | == Configurations == | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! style="width: 70%" | | ||
+ | ! style="width: 30%" | | ||
+ | |- | ||
+ | | | ||
===File Structure=== | ===File Structure=== | ||
*/META-INF/ | */META-INF/ | ||
Line 22: | Line 41: | ||
**zk/ | **zk/ | ||
***lang.xml '''(optional)''' | ***lang.xml '''(optional)''' | ||
− | + | ***lang-addon.xml '''(optional)''' | |
− | ***lang-addon.xml | ||
===File descriptions=== | ===File descriptions=== | ||
Line 32: | Line 50: | ||
** mesg/ | ** mesg/ | ||
*** msg<jar name>.properties | *** msg<jar name>.properties | ||
− | **** ''These files are i18n resource files,you can define with the locale you want , the default file is msg<jar name>.properties. '' [[ | + | **** ''These files are i18n resource files,you can define with the locale you want , the default file is msg<jar name>.properties. '' <br /> [[ZK_Developer%27s_Reference/Internationalization/Warning_and_Error_Messages|ZK Internationalization]] |
** xml/ | ** xml/ | ||
− | *** < | + | *** <jar-name>.xsd |
**** ''The xml schema for component tags in zul'' | **** ''The xml schema for component tags in zul'' | ||
+ | ** tld | ||
+ | *** config.xml | ||
+ | **** '' For taglibs definition. (ex. zweb.jar use this for dsp.) '' | ||
** zk/ | ** zk/ | ||
+ | *** lang-addon.xml | ||
+ | **** ''The language add-on define components , and it defined the component classes, javascript widget/mold/css. <Br /> it should contains At least one lang.xml or lang-addon.xml '''usually you will need a lang-addon.xml''' . '' | ||
*** lang.xml | *** lang.xml | ||
− | **** ''The language definition file (ex. | + | **** ''The language definition file with namespace (ex. http://www.w3.org/1999/xhtml for zhtml)'' |
− | |||
− | |||
− | |||
− | |||
− | |||
+ | | | ||
+ | '''The example from zul.jar''' | ||
[[File:Jar_File_configuration1.jpg]] | [[File:Jar_File_configuration1.jpg]] | ||
+ | |} | ||
== Component classes == | == Component classes == | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! style="width: 70%" | | ||
+ | ! style="width: 30%" | | ||
+ | |- | ||
+ | | | ||
===File Structure=== | ===File Structure=== | ||
*/package-folder | */package-folder | ||
Line 57: | Line 84: | ||
* ''The java classes of component. just like normal jar file.'' | * ''The java classes of component. just like normal jar file.'' | ||
− | + | | | |
+ | '''The example from zul.jar''' | ||
+ | [[File:Jar_File_component1.jpg]] | ||
− | + | |} | |
== Widget Resources == | == Widget Resources == | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! style="width: 70%" | | ||
+ | ! style="width: 30%" | | ||
+ | |- | ||
+ | | | ||
===File Structure=== | ===File Structure=== | ||
*/web/ | */web/ | ||
Line 94: | Line 129: | ||
− | + | | | |
+ | '''Example for box from zul.jar ''' | ||
[[File:Jar_File_widget1.jpg]] | [[File:Jar_File_widget1.jpg]] | ||
+ | |||
+ | |} | ||
== Static Resources == | == Static Resources == | ||
+ | |||
+ | {| class="wikitable" | ||
+ | ! style="width: 70%" | | ||
+ | ! style="width: 30%" | | ||
+ | |- | ||
+ | | | ||
===File Structure=== | ===File Structure=== | ||
* /web/ | * /web/ | ||
− | ** <component-package> / | + | ** <component-package> / '''(optional)''' |
*** css /'''(optional)''' | *** css /'''(optional)''' | ||
**** <css files>'''(optional)''' | **** <css files>'''(optional)''' | ||
**** zk.wcs'''(optional)''' | **** zk.wcs'''(optional)''' | ||
− | |||
*** img /'''(optional)''' | *** img /'''(optional)''' | ||
**** <img files>'''(optional)''' | **** <img files>'''(optional)''' | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
===File descriptions=== | ===File descriptions=== | ||
Line 128: | Line 162: | ||
*****'' For some static css file you might need. '' | *****'' For some static css file you might need. '' | ||
**** zk.wcs | **** zk.wcs | ||
− | *****''Let you can config the CSS file for | + | *****''Let you can config the CSS file for particular language '' |
*** img/ | *** img/ | ||
**** <img files> | **** <img files> | ||
***** '' This is a folder for some image files , and you can access them in xxx.css.dsp files through ${c:encodeURL('~./img/<component-package>/xxx.png')} | ***** '' This is a folder for some image files , and you can access them in xxx.css.dsp files through ${c:encodeURL('~./img/<component-package>/xxx.png')} | ||
+ | | | ||
− | + | '''Example from zul.jar''' | |
− | |||
− | |||
[[File:Jar_File_static_resources1.jpg]] | [[File:Jar_File_static_resources1.jpg]] | ||
− | + | |} | |
{{ZKComponentDevelopmentEssentialsPageFooter}} | {{ZKComponentDevelopmentEssentialsPageFooter}} |
Latest revision as of 07:22, 11 August 2011
Jar Files
Packing a component as a Jar file will make it easy to deployment. This article demonstrates the steps and requirements of it.
|
Configurations
File Structure
File descriptions
|
Component classes
File Structure
File descriptions
|
Widget Resources
File Structure
File descriptions
|
Static Resources
File Structure
File descriptions
|
Example from zul.jar
|