TR: Using standard directive in custom directive

2009-01-20 Thread Harter Damien
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.

Re: How to load a macro from file (again!!!)

2009-01-20 Thread Nathan Bubna
I would just make a new engine when adding to the global velocimacro library. There is a merge method that allows you to specify macro libraries at merge time, but they don't stay in memory. You can set your properties so that inline macros are always registered as global, but that has obvious si

Re: WebappResourceLoader: ResourceNotFoundException

2009-01-20 Thread Nathan Bubna
On Sun, Jan 18, 2009 at 8:18 AM, Kai Schlichting wrote: > Hi! > > I tried to get Velocity working with WebappResourceLoader for a web project. > My current code: > > Properties props = new Properties(); > props.setProperty("resource.loader=webapp", "webapp"); this is wrong. do: props.setPropert

Re: WebappResourceLoader: ResourceNotFoundException

2009-01-20 Thread Nathan Bubna
Agreed. Let's change that. Besides, most methods that need Velocity to be init'ed will now call it themselves if used before init() has been called. There is absolutely no reason to call init from any constructor. On Mon, Jan 19, 2009 at 11:12 PM, Byron Foster wrote: > > On Jan 19, 2009, at 13

Re: WebappResourceLoader: ResourceNotFoundException

2009-01-20 Thread Byron Foster
Created a ticket for it here: https://issues.apache.org/jira/browse/VELOCITY-673 On Jan 20, 2009, at 15:09 , Nathan Bubna wrote: Agreed. Let's change that. Besides, most methods that need Velocity to be init'ed will now call it themselves if used before init() has been called. There is abso

Re: Using standard directive in custom directive

2009-01-20 Thread Nathan Bubna
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 wrote: > Hi > > I'm testing my custom directive and I have one case

Using standard directive in custom directive

2009-01-20 Thread Harter Damien
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.

RE: Using standard directive in custom directive

2009-01-20 Thread Harter Damien
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 a CustomIf that writes if the "If" block the initial

RE: Using standard directive in custom directive

2009-01-20 Thread Harter Damien
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 t