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.

Reply via email to