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
Is arraylist ordered?
Which is bigger double or float?
What is hotjava?
What are the Static and Dynamic Variables? Differentiate them.
Which is dependent variable?
Can we override private methods?
Can an interface implement another interface?
Why synchronization is important in java?
Can you inherit from an abstract class java?
Does .length start 0 java?
What are the different ways to handle exceptions?
how we can make a write-only class in java?
Why set is used in java?
Can we create an object of private class?
Does java return by reference?