I am trying to iterate over a Vector using the logic:iterate tag.
Everything works fine until I try to set an offset. 
The offset for where I need to start iterating from is passed in as a
parameter to the page and I retrieve it using 
<bean:parameter id="fromRecord" name="FROMRECORD" value="0"/>

when I try to use fromRecord in the iterate tag 
<logic:iterate id="result" name="search" scope="session"
indexId="resultsPrinted" offset="fromRecord" length="20">  

I get the following on the page
javax.servlet.ServletException: java.lang.String

This makes sense since fromRecord is of type String and offset is expecting
an int or Integer.

So I then tried to make the offset a variable using
<% int fromRec = Integer.parseInt(fromRecord); %>   and
<logic:iterate id="result" name="search" scope="session"
indexId="resultsPrinted" offset="fromRec" length="20">  

This doesn't throw an error but doesn't set the correct offset and is always
starting from 0.  

How can I retrieve the parameter and use it in the iterator?

Kimberly MacKellar
Thomson Financial Publishing
[EMAIL PROTECTED]

Reply via email to