Re: syntax change in velocity 1.7

2011-06-01 Thread Sergey Maslov
No ideas... On Wed, Jun 1, 2011 at 9:26 AM, Will Glass-Husain wglasshus...@gmail.com wrote: Hi, I just did a test upgrade of a site from Velocity 1.6.2 to Velocity 1.7.  A number of my templates started to fail because they included square brackets.   (Ironically, we discovered this soon

Re: syntax change in velocity 1.7

2011-06-01 Thread Jean-Baptiste BRIAUD -- Novlog
Unfortunately, there is no introspection in Velocity. One complicated idea would be to meta parse your template. The idea would be to use a kind of Velocity introspection on all your templates. Each time this introspection encounter a variable, like ${a} or a, you replace it with a meta template

Re: syntax change in velocity 1.7

2011-06-01 Thread Claude Brisson
You can alter your templates to match the new syntax, something like: find . -name *.vtl | xargs sed -ri -e s/\\\$([a-z.\(\)]+)(\[[^\]+])/$\{\1\}\2/g so that every reference which is followed by square brackets will be enclosed in curly brackets. Claude On 2011-06-01 09:44, Sergey

Re: syntax change in velocity 1.7

2011-06-01 Thread Will Glass-Husain
Thanks, Claude, That's probably what I'll end up doing. Either one time or possibly do it dynamically in a custom resource loader. (The problem is these files are all spread out in different accounts with different authors and versioning). WILL On Wed, Jun 1, 2011 at 1:11 AM, Claude Brisson

Does velocity provide these features?

2011-06-01 Thread Moe221
Hi there, i'm evaluating Velocity to find out whether it meets my requirements to generate text by using custom templates. I looked at the user guide and wrote a little hello world application but there are requirements for which I don't know if I have to write my own methods or if there are

Re: Does velocity provide these features?

2011-06-01 Thread Sergiu Dumitriu
On 06/01/2011 03:40 PM, Moe221 wrote: Hi there, i'm evaluating Velocity to find out whether it meets my requirements to generate text by using custom templates. I looked at the user guide and wrote a little hello world application but there are requirements for which I don't know if I have to

Re: Does velocity provide these features?

2011-06-01 Thread Nathan Bubna
As Sergiu said, this is a job for tools and the DisplayTool that is part of the VelocityTools project supports only one of the listed features. However, if you have code or write code for the other features, those would be welcome as patches to the DisplayTool, as those are just the kind of thing

Re: Custom Java Object stored in Velocity Context

2011-06-01 Thread Nathan Bubna
The class of the object and the method itself must be declared public. On Wed, Jun 1, 2011 at 1:38 PM, Logan Stinger lstin...@bluelid.com wrote: I have the following code: … ListICODocument history = repository.getDocumentHistoryForId(8B2F2F53-7DEA-45B6-84BA-60F2FA11F07D);

Re: Custom Java Object stored in Velocity Context

2011-06-01 Thread Nathan Bubna
Well, i've got no problems getting Velocity to call public methods on instances of publicly declared classes. Got any more info you can share? Like the class in question? Velocity version? Log messages? Anything? On Wed, Jun 1, 2011 at 7:53 PM, Logan Stinger lstin...@bluelid.com wrote: The