How to Paginate an entire set of results in JSP
The problem I am facing is I am unable to paginate all the results that I have. To give a clear explanation I will try to give an example. Supposedly a person tries to search for a restaurant in a particular area. Now in the first go itself I am filtering out all the restaurants rather than fixing a pagelimit and search limit. So basically I have the entire list of restaurants for that particular area. Now I want my page to display 10 restaurants at a time. Can I do this entire operation on the client side itself ? Means the next button should just iterate through the rest 开发者_JAVA技巧of the restaurants left to display and 10 at a time. Similarly the previous button should work as well. Moreover I am using google big table rather than traditional db. Any answer is heartily obliged.
Generally speaking, you want to grab only the amount of data you need for your page. Example: I have 1000 records, but I only show 25 at a time, and I want first, last, previous, next buttons. A good place to get started for JSP is DisplayTag: http://www.displaytag.org/1.2/.
精彩评论