Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2008-06-23
3
Medium Priority
?
1,494 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 1500 total points
ID: 21853302
0

Featured Post

Containers & Docker to Create a Powerful Team

Containers are an incredibly powerful technology that can provide you and/or your engineering team with huge productivity gains. Using containers, you can deploy, back up, replicate, and move apps and their dependencies quickly and easily.

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
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.

660 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