Solved

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

Posted on 2008-06-23
3
1,485 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 500 total points
ID: 21853302
0

Featured Post

What Is Transaction Monitoring and who needs it?

Synthetic Transaction Monitoring that you need for the day to day, which ensures your business website keeps running optimally, and that there is no downtime to impact your customer experience.

Question has a verified solution.

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

I had a project requirement for a displaying a user workbench .This workbench would consist multiple data grids .In each grid the user will be able to see a large number of data. These data grids should allow the user to 1. Sort 2. Export the …
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
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.

734 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