Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How to do Pagination with out using display tag api and java script

Posted on 2008-06-23
3
Medium Priority
?
1,501 Views
Last Modified: 2013-11-24
I am doing pagination . every time i want to display 15 records on the page. And when i will click on next button i want to retreive next 15 records and on clicking previous should come to previous results.

Is there any good example code to implement this pagination technique without display tag and jaav script.
only using server side code (java code)
0
Comment
Question by:Shakil_Akhtar
  • 2
3 Comments
 
LVL 13

Expert Comment

by:MicheleMarcon
ID: 21852900

String records[];//already initialized
int recordsPerPage=30;//for example
 
view (int page)
{
for (int i=page*recordsPerPage;i<(page+1)*recordsPerPage;i++)
System.out.println(records[i]);
}

Open in new window

0
 

Author Comment

by:Shakil_Akhtar
ID: 21852951
This will happen if we already  have all matching data from data base. But in my case i have a web service that is returning 16 records at a time with matching data. If matching data is 30 then first time it will give 16 and i will enable next button for getting remaining items.
So how to handle this either from screen side or from hibernate implementation(i.e from DB side).
I have written hibernate because my web service is developed using hibernate.

Please give an elavorated example to understand complete functionality.
Thanks,
0
 
LVL 13

Accepted Solution

by:
MicheleMarcon earned 1500 total points
ID: 21853302
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
The viewer will learn how to implement Singleton Design Pattern in Java.
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month11 days, 14 hours left to enroll

916 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question