Hi

I am trying to develop an application that will be themeable. I want
themes to be distributed packed in jars, but i don't know how to make
Wicket search inside Jars for the html templates. Till now, i used
this code for loading templates from a directory:

CompoundResourceStreamLocator locator =
(CompoundResourceStreamLocator)getResourceSettings().getResourceStreamLocator();
WebApplicationPath resourceFinder = (WebApplicationPath)
getResourceSettings().getResourceFinder();
resourceFinder.add(
getWicketServlet().getServletContext().getRealPath("WEB-INF/templates/mollio/")
);
locator.add(0, new WebPageResourceStreamLocator(resourceFinder));

With this code, resourceFinder.add() only accepts directories, isn't
it? Now i want the templated to be searched from a jar (distributed as
plugins) or from a directory (distributed with the installation).
Also, the theme can be dynamically changed, by the administrator, or
by the user settings, so the new path for the templates must no be
added to the current paths, the new path must overwrite the old value.

Any idea? Thanks in advance.

-------------------------------------------------------------------------
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