Hello,

I want to iterate a collection only few rows per page.

I have an offset parameter in my request that give the offset.

<!-- Definition of the offset parameter -->
<bean:parameter id="offset" name="offset" value="0"/>

<!-- Iteration -->
<logic:iterate id="faq" length="2" name="faqList" offset="<% new
Integer(offset) %>" type="be.xyz.faq.form.FAQForm">
    <p><bean:write name="faq" property="question"/></p>
    <p><bean:write name="faq" property="answer"/></p>
</logic:iterate>

<!-- Link to next page (don't works) -->
<html:link page="/listfaq.jsp?&offset=<%= Integer.parseInt(offset)+2
%>">Next</html:link>

Here is my questions :

- Can I define my offset bean as a java.lang.Integer to avoid this code :
offset="<% new Integer(offset) %>" ?
- How can I build my link to tell that the offset bean must be incremented
of 2 and placed in request as offset parameter ?

Thanks for your help.

Laurent Cornelis

Reply via email to