Problem with TemplateLoader changing the template's name

Sven Schliesing <[email protected]> Mon, 26 Sep 2005 15:49:57 +0200
Newsgroups gmane.comp.java.webmacro.user
Message-ID <[email protected]>
Hi,

I just finished my custom template loader for webmacro. Goal of it is 
context-based template loading and internationalization . It takes a 
template name ("index" for example), determines the directory where the 
appropriate version resides and adds an internationalization suffix.

example:
Template "index" in the context of the site "testSite" for language "en" 
results in "testSite/index_en.wm" to be loaded.

Works perfect. At least as long as I deactivate caching.

Cause unfortunately the CacheManager/Provider/whatever does not get 
notice of that the template name changed. So it returns the en-version 
when the de-version should be loaded and so on...

Is there a way to let the CacheManager/Provider/whatever know about the 
changed template name?

I also tried to work around this and not determine the resulting name 
_inside_ the loader but call the loader with the already computed name. 
This works as intended but leaves include-directives untouched.


Thanks in advance for your help!


Sven


-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php