Revision history [back]

click to hide/show revision 1
initial version

answered 2021-01-19 10:33:05 +0800

cor3000 gravatar image cor3000

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.

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

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

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