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?
On 05/30/2011 08:36 PM, Robert Lee wrote:
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?
I have tried
#foreach($i in [1..$n])
Where $n is set into the context as
context.put($n, rs.getString(n));
oops. I should have caught it myself.
context.put($n, rs.getInt(n)); did the trick
Thanks for your insight.
On 5/30/2011 2:57 PM, Sergiu Dumitriu wrote:
On 05/30/2011 08:36 PM,