• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • Mikalai Zaikin

Pagination

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic