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 multiple inheritance supported by java?
Explain java thread life cycle.
What is boolean law?
What is size () in java?
What are the different types of constructor?
Which is easier .net or java?
What are the differences between wait() and sleep()?
What are the 6 boolean operators?
What are different types of multitasking?
What is return used for in java?
What do you mean by garbage collection used in java?
What does %d do in java?
Does A Class Inherit The Constructors Of Its Superclass?
what is meant by encapsulation?
What is the difference between scrollbar and scrollpane?