java - Pagination with Hibernate Criteria -


i facing problem in pagination. using criteria. display length 10. while clicking pagination shows different results list 9 , 8 that. how avoid kind of pagination problems. need list 10 every time. how control kind of inconsistancy.

user setfirstresult() , setmaxresults() this. here short code example:

entitymanager em = ..... .................... typedquery<t> query = em.createquery(criteria); query.setfirstresult(pagenumber * pagesize); query.setmaxresults(pagesize); 

Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -