Hello Vijay,

You can use the  length and offset attributes of the iterator tag.

The length is used to tell the iterator the number of times/number of items
to retrieve from the collection.

Offset is used to indicate the offset into the collection.

So for example, if you want to display only 10 items of the then you would
do something like this:

        <logic:iterate id="order"
                     name="orderlist"
                     length="10"
                     offset="0">

Hope that helps.

Regards,

Todd G. Nist
-----Original Message-----
From: Vijay Kumar [mailto:[EMAIL PROTECTED]]
Sent: Saturday, August 03, 2002 4:15 AM
To: [EMAIL PROTECTED]
Subject: Limiting No of Records per page/view



Hi,
    I am using Struts  . I need to displays say 10 records per page/view and
give user ability to click on either next button or hyperlink to display
next set of 10 records. User should also have the ability to go back by
clicking previous button. I am able to display all records using iterate
tag, but not able to limit the no of records shown. Any example or code will
be helpful.
This is what i am doing to display records.

<logic:iterate id="selling" name="table.list">

        <tr>
        <td width="150" height="15" class="tableRowsReadOnly">
       &nbsp<bean:write name="selling" property="sellingcode"/>
        </td>

       <td width="150" height="15" class="tableRowsReadOnly">
       &nbsp<bean:write name="selling" property="season"/>
        </td>

</logic:iterate>

Cheers
vkvk

_________________________________________________________________
Join the world’s largest e-mail service with MSN Hotmail.
http://www.hotmail.com


--
To unsubscribe, e-mail:
<mailto:[EMAIL PROTECTED]>
For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to