Re: Call a velocity macro

2008-02-20 Thread Nathan Bubna
On Wed, Feb 20, 2008 at 2:18 PM, Geir Magnusson Jr. <[EMAIL PROTECTED]> wrote: > There was something really sucky about it, which is why I didn't move > it forward. I forget why it was bad... Hmm. Well, that's a good reason to wait for some good test code for it before we consider promotion...

Re: Call a velocity macro

2008-02-20 Thread Geir Magnusson Jr.
There was something really sucky about it, which is why I didn't move it forward. I forget why it was bad... geir On Feb 20, 2008, at 5:16 PM, Nathan Bubna wrote: I'm pretty sure #local is still just in Geir's whiteboard section. No one has ever gotten it promoted out of there. I've never

Re: Call a velocity macro

2008-02-20 Thread Nathan Bubna
I'm pretty sure #local is still just in Geir's whiteboard section. No one has ever gotten it promoted out of there. I've never been opposed to it, but i've also never been interested in putting the work needed into it (tests, docs, etc). http://svn.apache.org/repos/asf/velocity/engine/trunk/whit

Re: Call a velocity macro

2008-02-20 Thread Adrian Tarau
Thanks, I think I will implement a different directive, based on #parse but passing the parameters & having all the variables local to the "function". I'm not aware of any directive called #local. What do you mean? [EMAIL PROTECTED] wrote: Hi Adrian, in a similar scenario I use the #parse dire

Re: Call a velocity macro

2008-02-20 Thread Christopher Schultz
Christoph, [EMAIL PROTECTED] wrote: For this I used a different namespace (postfixed variables with "_"), but you can also use the new #local directive to avoid conflicts. I don't see #local in the documentation. Could you point me to it? -chris signature.asc Description: OpenPGP digital

Re: Call a velocity macro

2008-02-20 Thread apache
Hi Adrian, in a similar scenario I use the #parse directive and placed the code snippets (aka. macros) into a *.vtl file each. Something like: #set( $component = ... ) #set( $type = $component.type ) #parse("renderComponent${type}.vtl" ) This has the advantage, that these rendering Templates p