From: Alex Twisleton-Wykeham-F. <al...@fi...> - 2005-03-11 16:11:11
|
On Friday 11 March 2005 15:57, Marc Palmer wrote: > > Two questions:- > > > > 1. what package did you put your StringTemplateLoader class into? > > package org.webmacro.resource; OK. maybe put the following into your StringTemplateLoader:- static { System.err.println("StringTemplateLoader booting up"); } which will tell you whether or not the class is being loaded from the WebMacro.properties file. <snip> > > 2. what was in the WebMacro template that threw the error? > > #include "pagebegin.wm" > <p> > #foreach $contentItem in $content > #if ($contentItem.View) > #include "views/$(contentItem.View).wm" > #else > #if ($contentItem.ContentType = "text/html") > <div> > <h1>$contentItem.Description</h1> > #include as template "string:$contentItem.Data" > </div> > #end > #end > #end > </p> > #include "pageend.wm" > > The String returned by $contentItem.Data is the text to use as the > template, i.e. "<p>Hello, $name</p>" This all looks fine as far as I can see. Try sticking a debug message in the load method of the StringTemplateLoader to see whether or not it is actually getting invoked. Can you mail me the source to your StringTemplateLoader off list and I'll run it besides my EvaluatingTemplateProvider and see if they behave differently... Alex |