[stringtemplate-interest] Escaping
Tom Bentley
tom at egressive.com
Tue May 3 14:32:36 PDT 2005
> Your controller wraps objects
> such as name in other objects that render it according to the target.
> I'm thinking of adding a mapping that lets you just once say "wrap all
> String objects in HTMLStringRenderer objects".
So you can simply add a Renderer to a template (much as you can set
attributes on it), and the renderer is in charge of converting Objects
to Strings...? If the don't add a renderer you'd get the default
renderer, which just uses Object.toString(), as we have at the moment
(thogh doesn't it convert null to the empty string?).
It seems the simple and obvious way to do it, and I like simple and
obvious things!
Cheers,
Tom
More information about the stringtemplate-interest
mailing list