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

You would be better off using IResourceStreamLocator directly. Use the
decorator pattern to pass on to other locators if the one you built
can't find it.

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

That's not really something you can implement in a straightforward
fashion I'm afraid, as you're typically not in charge of the
classloading. Maybe for your case, you have to take charge, but that's
way out of Wicket's scope. Or think about a solution where you don't
have to rely on the order of classloading. For instance, create some
dynamic registration and use e.g. time stamps with your register (new
time stamps 'win'). Look at how Wicket's IInitializers work for ideas
(not for time stamping, but you could do the registering in such an
initializer).

Eelco

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Wicket-user mailing list
Wicket-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wicket-user

Reply via email to