-
FEATURED COMPONENTS
First time here? Check out the FAQ!
1 | initial version | |
ok good to know the mechanism works using
/web/js/[yourpackage]/zk.wpd
That's let's say level 1. And can be loaded using zk.load('yourpackage', callback)
.
Since ZK uses this mechanism internally also for nested modules this functionality is also available to you. Still the path in your source files needs to start with /web/js
followed by your package folders, then zk.wpd
e.g.:
/web/js/dir1/dir2/somepackage/zk.wpd
<package name="dir1.dir2.somepackage" language="xul/html">
<!-- your scripts, widgets -->
</package>
you'll then be able to load this package via zk.load('dir1.dir2.somepackage', callback)
.
If you provide multiple file with the same folder/names it depends on the java classloader which resource is found first and loaded. So if possible avoid that.
2 | No.2 Revision |
ok good to know the mechanism works using
/web/js/[yourpackage]/zk.wpd
That's let's say level 1. And can be loaded using zk.load('yourpackage', callback)
.
Since ZK uses this mechanism internally also for nested modules this functionality is also available to you. Still the path in your source files needs to start with /web/js
followed by your package folders, then zk.wpd
e.g.:
/web/js/dir1/dir2/somepackage/zk.wpd
<package name="dir1.dir2.somepackage" language="xul/html">
<!-- your scripts, widgets -->
</package>
you'll then be able to load this package via zk.load('dir1.dir2.somepackage', callback)
.
If you provide multiple file with the same folder/names it depends on the java classloader which resource is found first and loaded. So if possible avoid that.
And the docs: https://www.zkoss.org/wiki/ZKClient-sideReference/WidgetPackageDescriptor
3 | No.3 Revision |
ok good to know the mechanism works using
/web/js/[yourpackage]/zk.wpd
That's let's say level 1. And can be loaded using zk.load('yourpackage', callback)
.
Since ZK uses this mechanism internally also for nested modules this functionality is also available to you. Still the path in your source files needs to start with /web/js
followed by your package folders, then zk.wpd
e.g.:
/web/js/dir1/dir2/somepackage/zk.wpd
<package name="dir1.dir2.somepackage" language="xul/html">
<!-- your scripts, widgets -->
</package>
you'll then be able to load this package via zk.load('dir1.dir2.somepackage', callback)
.
If you provide multiple file with the same folder/names it depends on the java classloader which resource is found first and loaded. So You have to avoid this if possible avoid that.you want reliable/predictable wdp loading.
And the docs: https://www.zkoss.org/wiki/ZKClient-sideReference/WidgetPackageDescriptor