How to config scope behavior of Velocity macro

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

How to config scope behavior of Velocity macro

earist
This post has NOT been accepted by the mailing list yet.
Hi all,

I have upgraded velocity from 1.6 to 1.7
There are some behavior changes that affect to my code.

Following is example:

-------------------------------------------
#macro(test1 $c $d)
#set($d = "2")
#end

#set($a = "1")
#test1($a, $b)
Result : A = $a, B = $b, C = $c, D = $d
-------------------------------------------

For velocity 1.6
The output is
Result : A = 1, B = 2, C = 1, D = 2

For velocity 1.7
The output is
Result : A = 1, B = , C = , D = 2

I have known that there are changes of velocity engine.
However, I have implmented a lot of complex code with thousands of lines.
So, it hard to change all.

Is there any solution or config to change scoping behavior of Velocity (without my code change)?
I have tried to see Velocimacro Properties, but it don't help me for this problem.

Thanks in advance
earist