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...
Answers were Sorted based on User's Feedback
Answer / 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 |
How is hashset defined in java?
Do I need java for windows 10?
What do you understand by Header linked List?
How many methods does cloneable interface contains?
Can we clone singleton object in java?
what is difference between equals and ==?
What is object cloning in Java?
0 Answers SwanSoft Technologies,
Which is a valid identifier?
What are access specifiers in java ?
0 Answers Akamai Technologies,
In how many ways we can do exception handling in java?
Can we define static methods inside interface?
what is default layout of JFrame class?