Rob Butler wrote:
Hello all,
I read the velocity docs, and according to them I can
write the function below in two ways:
Method 1:
#macro(displayPositiveOnly $val)
#if($val >= 0)
$val
#end
#end
Method 2:
#macro(displayPositiveOnly $val)#if($val >=
0)$val#end#end
And either way the output will be the same. I have
tried both ways of defining the macro, and indeed both
ways have the same output. However, both ways also
add about half a dozen extra spaces in front of $val,
Perhaps you used something like
<bla>
<pre>
#displayPositiveOnly(4)
</pre>
</bla>
I this case $val has 8 spaces in front of it ...
which causes a problem. Does Velocity have a bug in
it's white space removal? Am I doing something wrong?
I am using Velocity version 1.4 that shipped with the
SpringFramework 1.1.2. $val is an integer.
Thanks!
Rob
__________________________________
Do you Yahoo!?
The all-new My Yahoo! - What will yours do?
http://my.yahoo.com
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
--
Carsten Heyl [EMAIL PROTECTED]
Pixelboxx GmbH http://www.pixelboxx.de/
Ostenhellweg 56-58 Tel.: +49 231 53 46 30
D-44135 Dortmund
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]