velocity-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Robert Lee <Robt....@rcn.com>
Subject #foreach($i in [1..$n]) causes exception
Date Mon, 30 May 2011 18:36:23 GMT
I have tried
#set($n = 2)
#set($range = "[1..$n]")
#foreach($i in $range)
as well  Velocity 1.7 fails when it reaches the range variable in the 
#foreach directive.

Is there a way to accomplish what I am trying to do, (a variable count 
loop) in velocity?

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@velocity.apache.org
For additional commands, e-mail: user-help@velocity.apache.org


Mime
View raw message