• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pagination

 
Mohammed Niaz M.
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I want to do pagination using jsp & struts. Im using my own taglib which is like

<inte ageindex
pageIndex='<%=new PageIndex(startIndex,records_per_page,total_records) %>'
url='<%="A.do?event=list&startIndex="%>'
submitFlag='<%=new Boolean(false)%>
</inte>


I have to get the values from the external file which is in *.csv format.

From class file,im storing all values in Collection and passing to JSP page.

In Jsp page
-----------
<%
Collection OBList = (Collection)request.getAttribute("request.OBAList");
int startIndex = 0;
if (OBList != null && OBList.size() > 0) {
pageContext.setAttribute("OBList",OBList);

}


%>

Using the OBList collection able to load all the records to the Jsp page and its working fine but here the problem is i have to disply it according to the pagination link.

the sample link looks like ===> pg 1 2 3 Next

If i use this PageIndex(0,5,15) the URL is
After click the number 2 the URL
The URL:http://localhost:7080/training/A.do?event=list&startIndex=5


Thanks in Advance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic