This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Struts and the fly likes How to display 5 rows per page in dynamic listing Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to display 5 rows per page in dynamic listing " Watch "How to display 5 rows per page in dynamic listing " New topic

How to display 5 rows per page in dynamic listing

A.S. HariLal
Ranch Hand

Joined: Oct 24, 2007
Posts: 31
Hai Dear Friends,
I am new to this group and new to Struts Tecnology. Now I am face a problem during the listing process using logic Iterate. I have a huge amount of records in my database. But I want to display only 5 rows in my list at a time. And other records(rows) can be accessed by clicking the link like (1,2,3.....)(that just seen in a search engine like Google).
can any one kindly help me to find a solution for this.......
The Following Is the code that I used for creating the dynamic List. It works properely for me. In this what should be added to satisfy my new requirment

<logic resent name="listArray">
<logic:notEmpty name="listArray">
<logic:iterate id="myTestForm" name="listArray" scope="request" type="something.*.MyTest">
<tr class="row1">
<td align="center" ><html:multibox property="multiBox"
value="<%=String.valueOf(myTestForm.getUserId())%>" /></td>
<td align="center" ><a href='<bean:write name="myTestForm" property="userId" filter="true"/<bean:write name="myTestForm" property="name" filter="true" /></a></td>
<td align="center" ><bean:write name="myTestForm" property="description" filter="true" /></td>
</logic resent>

Thanks in Advance,

[ October 24, 2007: Message edited by: Harilal A.S ]
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
This topic has been discussed on this forum and other Java Ranch forums. A search for "pagination" turned up lots of related threads.

- Brent
wood burning stoves
subject: How to display 5 rows per page in dynamic listing
Similar Threads
How to Display certain Number of Rows using logic:iterate
Show - Hide Functionality
drop down list: on refresh page by default select option is not coming
logic:present not working??????
getting value in logic iterate