addImport() issue

kukudas <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
hi,

straight to the point:

...
template = freemarkerConfig.getConfiguration().getTemplate("index.ftl");
import = freemarkerConfig.getConfiguration().getTemplate("myimports.ftl");
		List i = import.getImports();
		ll = (LibraryLoad) i.iterator().next();
		template.addImport(ll);
		return Action.SUCCESS
...

the myimports.ftl looks like this:
<#import "mod.ftl" as mod/>

the mod.ftl contains several macros.

but it does not add the import to the index.ftl and so i get an exception.
somebody know why? basicly i want my template not to know which librarys
will be loaded inside. so i can change easily things with adding a new
library or 
deleteing one.
thx for your help

kuku
-- 
View this message in context: http://www.nabble.com/addImport%28%29-issue-tp18006294p18006294.html
Sent from the freemarker-user mailing list archive at Nabble.com.


-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.