btw. I noticed the click-jquery has hardcoded path to the javascript
resources: declared $jsElements point to '/click-jquery' path
Is it a bug or feature? :)
This is a *feature*, and it's present in Click itself too :).
That path is not absolute but relative to the context path, so it's very
flexible that way, and there won't be any collisions if you have more
webapps on the same domain/server.
If you take a look at how click works with resources, you will see that
it can work out-of-the-box doing all the dirty work automatically for
you :) (work that other frameworks require you to do manually and with
too much config work):
- Automatic dependency management of resources: if a component/page
requires some resources (js, css, images), it will include only those
that aren't there already, in the right order, and of course they will
also variate from page to page.
- automatic deployment of resources: you don't have to copy manually
resources in your webapp to some predefined places so that the
application works: Click does this for you, and it also has ANT task to
do it for you in restricted environments where the WAR file isn't expanded).
- automatic versioning of resources: see the PerformanceFilter:
http://click.apache.org/docs/extras-api/org/apache/click/extras/filter/PerformanceFilter.html.
- predetermined "position" of each of these resources, so that it's
easy for you to override them if you need further tweaks, or just to
test things around :).
- many more ... :).
I hope this helps,
Adrian.