thanks Dimitrios

Its work if i place the code  as you told but still i have some problems

Below is my code 

Please have a look on it

#set ($count= $!data.getRequest().getParameter("countRow"))

i am getting this count value through request Parameter which i definately 
getting as a string that's why its not working 

Is there any method so that i will be able to convert this string value  into 
int value so that it works

Regards

T

----- Original Message ----- 
From: "Dimitrios Kolovos" <[EMAIL PROTECTED]>
To: "Velocity Users List" <velocity-user@jakarta.apache.org>
Sent: Wednesday, March 23, 2005 8:15 PM
Subject: Re: How to run for loop


> #set($count = 5)
> 
> #foreach($i in [0..$count])
>     ##Do your stuff here
> #end
> 
> ----- Original Message ----- 
> From: "tarun Narang" <[EMAIL PROTECTED]>
> To: "Velocity Users List" <velocity-user@jakarta.apache.org>
> Sent: Wednesday, March 23, 2005 2:42 PM
> Subject: Re: How to run for loop
> 
> 
> Thanks 
> 
> but my problem is that i dont want to use the object or ArrayList 
> 
> i want to run the loop like in java as for(int i=0 ;i<=5; i++) 
> 
> in velocity page
> 
> Is it possible to run the code like below
> 
> #set ($countRow =5)
> 
> #foreach($i in $!countRow) .......some statements  
> 
> #end 
> 
> ----- Original Message ----- 
> From: "Dimitrios Kolovos" <[EMAIL PROTECTED]>
> To: "Velocity Users List" <velocity-user@jakarta.apache.org>
> Sent: Wednesday, March 23, 2005 7:54 PM
> Subject: Re: How to run for loop
> 
> 
> > #foreach ($i in [0..10])
> >     ##Do your stuff here
> > #end
> > 
> > Please consider the RTFM principle.
> > 
> > Cheers,
> > Dimitrios
> > 
> > ----- Original Message ----- 
> > From: "tarun Narang" <[EMAIL PROTECTED]>
> > To: "Velocity Users List" <velocity-user@jakarta.apache.org>
> > Sent: Wednesday, March 23, 2005 2:06 PM
> > Subject: How to run for loop
> > 
> > 
> > > hi 
> > > 
> > > I want to run a for loop for a number of times in velocity page 
> > > how can i
> > > 
> > > Thanks
> > > T
> > > 
> > > 
> > > 
> > > 
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > > For additional commands, e-mail: [EMAIL PROTECTED]
> > >
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> > 
> > 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> 
> 

Reply via email to