velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Harter Damien" <dhar...@sopragroup.com>
Subject RE: Using standard directive in custom directive
Date Wed, 21 Jan 2009 07:48:51 GMT
I've found a work around : I'm calling Velocity.evaluate(context, writer, getName(), new BufferedReader(new
StringReader(generatedBlock.toString()))) on the generated strings.
The code of my directive is quite complexe. The goal is to generate XML code that writes in
the "If" block the initial template (commented lines), and in the "else" block, the adapted
template (variable replaced by the value, code is commented if the condition of the if statetement
is false). So that, the generated file is well formatted (according the XSD) and can be used
as a template too.

Damien.

-----Message d'origine-----
De : Nathan Bubna [mailto:nbubna@gmail.com] Envoyé : mercredi 21 janvier 2009 00:11 À :
Velocity Users List Objet : Re: Using standard directive in custom directive

I've not heard of this before.   If you're free to share the code for
your custom directive, we might be able to see what's going wrong.
Also, what version of Velocity are you using?

On Tue, Jan 20, 2009 at 7:04 AM, Harter Damien <dharter@sopragroup.com> wrote:
> Hi
>
> I'm testing my custom directive and I have one case that doesn't work 
> when I have a standard directive (#foreach in my case) in my custom 
> "BLOCK" directive. Does anyone ever handle with this issue ?
>
> Damien.
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Mime
View raw message