How to stop lazy loading of <#include> files?

Chris <[email protected]>
Newsgroups gmane.comp.web.freemarker.user
Message-ID <[email protected]>
My app, unfortunately, needs to analyze the content of a template before 
creating a model. It needs to know whether certain expensive-to-create 
${variable}s are present before generating the model.

We're trying to use <#include> so we can share common elements in our 
web pages, like headers and sidebars. Unfortunately, this presents a 
problem because the Template class loads <#include> objects in a lazy 
way. It's not until you call Template.process() that the system calls 
the TemplateLoader for each include file.

How can I force the system to load all of the includes in advance?

Then, once they're loaded, how can I get the raw (unprocessed) text of 
the page, includes included?


------------------------------------------------------------------------------
Learn how Oracle Real Application Clusters (RAC) One Node allows customers
to consolidate database storage, standardize their database environment, and, 
should the need arise, upgrade to a full multi-node Oracle RAC database 
without downtime or disruption
http://p.sf.net/sfu/oracle-sfdevnl
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.