This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes Pagination In struts with oracle database Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Pagination In struts with oracle database" Watch "Pagination In struts with oracle database" New topic
Author

Pagination In struts with oracle database

KR Kalaimani
Greenhorn

Joined: Aug 07, 2008
Posts: 3
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

Joined: May 20, 2008
Posts: 78
Use Display Tag for pagination....

Regards
Bhagavan R
Shikhar Madhok
Ranch Hand

Joined: Dec 18, 2006
Posts: 95
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


He who asks a question is a fool for five minutes; he who does not ask a question remains a fool forever - Chinese proverb
KR Kalaimani
Greenhorn

Joined: Aug 07, 2008
Posts: 3
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Pagination In struts with oracle database