• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Pagination In struts with oracle database

 
KR Kalaimani
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi


I have a requirement where I have to fetch some records from the database and then I have to show 50 records per page on a JSP. The page will be having First, Previous, Next and Last buttons on the screen. Has anyone implemented similar functionality in struts or similar framework? or give me example application on pagination. Could you please help me. Thanks in Advance.
 
rajanikanth bhagavan kanth
Ranch Hand
Posts: 78
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use Display Tag for pagination....

Regards
Bhagavan R
 
Shikhar Madhok
Ranch Hand
Posts: 95
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by KR Kalaimani:
Hi


I have a requirement where I have to fetch some records from the database and then I have to show 50 records per page on a JSP. The page will be having First, Previous, Next and Last buttons on the screen. Has anyone implemented similar functionality in struts or similar framework? or give me example application on pagination. Could you please help me. Thanks in Advance.


Welcome to javaranch.
The August edition of javaranch's journal had a detailed article explaining pagination using JDBC and JSP. You might want to check that out and try to extend it usng struts.

HTH
Shikhar
 
KR Kalaimani
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by rajanikanth bhagavan kanth:
Use Display Tag for pagination....

Regards
Bhagavan R


Thank for u'r reply Bhagavan

I am very confused about paging. I used display tag for pagination.
I have some doubts regarding paging using Struts.
I have 4 links First,Previous,Next,Last.And I want to add one more text box for Enter the page number in text box for select Random page like fifty th page.
I want to retrieve list of say 20(per page record) record from database when user click on

next.

When I am using this tag ( <display:tablename="sessionScope.EmpList" pagesize="20">
<display:setProperty name="paging.banner.placement" value="bottom" />
<display:column property="empJob" title="Job" />
<display:column property="empSal" title="Salary" />
</display:table> ). How can I get the record size from db in first time because the value used pagination like [First/Prev] 1, 2, 3, 4, 5, 6, 7, 8 [Next/Last] . But I don't want fetch all records at first time. The list object get first 100 records for first 5 pages. The user select the 6th page then list object will fecth the value from db except the first 100 records and return this records. It will follow other pages.

I am very confiusing . what can i do? . I want some example code. Ayn one help me. It very urgent. Thanks in Advance.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic