I have 100 records in a table with two rows. I need to
display 10 records per page like Google Search. I need only
the Logic(Pagination) in Pure Java. No JSP and all..Thanks
in Advance...
Answer Posted / avani
String strPageNum = request.getParameter(“pageNum”);
int pageNum = 0;
if(strPageNum != null){
pageNum = new Integer(strPageNum).intValue();
}
int maxRowsPerPage = new Integer(request.getParameter
(“rowsPerPage”)).intValue();
//calculate
int rowEnd = pageNum * maxRowsPerPage;
int rowStart = (rowEnd - maxRowsPerPage) + 1;
| Is This Answer Correct ? | 9 Yes | 8 No |
Post New Answer View All Answers
What is data member in java?
Why is whitespace important?
Difference between final and effectively final ?
what is the difference between future and callable interface in java?
Is a class subclass of itself?
What do you mean by boolean?
How many bytes is string in java?
How do you format in java?
Explain the importance of thread scheduler in java?
What is java util?
Explain the difference between extends thread vs implements runnable in java?
What are the steps involved to write rmi based programs?
What is the significance of listiterator?
How can you traverse a linked list in java?
Can a static method be final?