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:[email protected]] 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 <[email protected]> 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: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to