Tauren Mills wrote:
> My goal is to allow a client with minimal web design skills to manage
> the html, css, image, and properties files with minimal risk of
> damaging the application.  I'd like the java class files to be located
> in a separate location.  And I'd like the folder structure of the
> webroot to be clean and make sense to the designer.

Can you give us more information on how things are not working as expected?

Specifically, how are you linking to your CSS/JS files? I presume you're
using resource references, and instead are including <link> elements in
the HTML?

Is Wicket rewriting these? See PrependContextPathHandler. This should
make your JS/CSS links absolute, against your context root. If your HTML
files are in there too, then this should Just Work.

Note that I don't think putting your HTML files into your web context
root is a great idea (at least, not for deployment).

You could instead create a parallel source folder (if you're using Maven
2, src/main/resources is automatic, and is ideal for this), and get your
web designer to put the CSS <link> elements inside a <wicket:remove> tag.

You'd then just go add(HeaderContributor.forCss(getClass(), "foo.css"));
in your actual code.

This has the benefit that if you wish to refactor bits of your app out
into libraries, all the CSS/HTML/etc. comes along with it, and it all
gets automatically packaged up my maven or whatever.

Other than that, I'm not sure if there's a more elegant way of doing
that in Wicket 1.2.x (1.3 makes this a little easier). Anyone else?

Al

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to