Re: A WM brain bender
Marc Palmer <[email protected]>
| Newsgroups | gmane.comp.java.webmacro.user |
|---|---|
| Organization | AnyWare Ltd. |
| Message-ID | <[email protected]> |
>
> Two questions:-
>
> 1. what package did you put your StringTemplateLoader class into?
package org.webmacro.resource;
...I have an orthogonal source tree for my framework WebMacro Ignition,
which was/will probably still be open source and this stuff is in the
non-Ignition specific packages of stuff that will work with WM standalone...
> 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>"
Cheers
--
Marc Palmer - - - [email protected]
Wangjammers, J2ME Developers
~ http://www.wangjammers.org/games/
Blog
~ http://www.jroller.com/page/Wangjammer5
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click