Re: iterate: offset

2001-07-08 Thread Rama Krishna

yes niall, doing multiple iterations in parallel, one for
querystrings(hashmap) and the other for report generation. will try as you
said.

thanks much,
rama.

- Original Message -
From: Niall Pemberton [EMAIL PROTECTED]
To: [EMAIL PROTECTED]
Sent: Saturday, July 07, 2001 2:46 PM
Subject: RE: iterate: offset


 Rama

 I tried what you wrote below and the jsp ,didnt compile.

 This did though, and worked :-)

   % int row=0; %
   logic:iterate ...
 logic:iterate ... length=1 offset='%= +row %'

% row++; %
 /logic:iterate
   /logic:iterate

 Also an alternative would be to use the indexId of the IterateTag which
 means you dont have to declare and increment your row variable.

   logic:iterate indexId=row ...

 logic:iterate ... length=1 offset='%= row.toString() %'
 /logic:iterate

   /logic:iterate

 Just out of interest - this looks like a solution to iterating through
 multiple collections in parallel - is that what your using it for?

 Niall


 -Original Message-
 From: Rama Krishna [mailto:[EMAIL PROTECTED]]
 Sent: 06 July 2001 18:46
 To: [EMAIL PROTECTED]
 Subject: iterate: offset


 hi all,

 i am trying to iterate with length and offset when length=1 all the time
 and offset gets incremented with each outer iteration.

 i am trying to do something like this

 % int row=0; %
 logic:iterate ...

 logic:iterate ... length=1 offset='%= \+row+\ %'


 % row++; %
 /logic:iterate
 /logic:iterate

 as offset takes an string i am enlosing the int in quotes. no errors, but
 the value remains the same.

 did any one try this.

 any help is greatly appreciated.

 thanks,
 rama.





RE: iterate: offset

2001-07-07 Thread Niall Pemberton

Rama

I tried what you wrote below and the jsp ,didnt compile.

This did though, and worked :-)

  % int row=0; %
  logic:iterate ...
logic:iterate ... length=1 offset='%= +row %'

   % row++; %
/logic:iterate
  /logic:iterate

Also an alternative would be to use the indexId of the IterateTag which
means you dont have to declare and increment your row variable.

  logic:iterate indexId=row ...

logic:iterate ... length=1 offset='%= row.toString() %'
/logic:iterate

  /logic:iterate

Just out of interest - this looks like a solution to iterating through
multiple collections in parallel - is that what your using it for?

Niall


-Original Message-
From: Rama Krishna [mailto:[EMAIL PROTECTED]]
Sent: 06 July 2001 18:46
To: [EMAIL PROTECTED]
Subject: iterate: offset


hi all,

i am trying to iterate with length and offset when length=1 all the time
and offset gets incremented with each outer iteration.

i am trying to do something like this

% int row=0; %
logic:iterate ...

logic:iterate ... length=1 offset='%= \+row+\ %'


% row++; %
/logic:iterate
/logic:iterate

as offset takes an string i am enlosing the int in quotes. no errors, but
the value remains the same.

did any one try this.

any help is greatly appreciated.

thanks,
rama.