[jboss-user] [JBoss Seam] - Re: @Factory Pagination
You could roll your own non-JPA entity query which woudl have methods for pagination. It's probably well worth it considering the re-use you can get out of them. Same with EntityHome. Cheers, Andy View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4112980#4112980 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4112980 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: @Factory Pagination
Note: EntityQuery requires JPA, so if you're just using plain Hibernate (like me) you might be out of luck :(. View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4112975#4112975 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4112975 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: @Factory Pagination
I just posted an example of Ajax paging with Richfaces Datascroller http://www.jboss.com/index.html?module=bbop=viewtopicp=4112998#4112998 View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4112999#4112999 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4112999 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user
[jboss-user] [JBoss Seam] - Re: @Factory Pagination
Hey Sven, Well, here's the problem, the factory method needs to know what page you are on, and then return the results for that page. The first easy option is to use an EntityQuery which has the firstResult and maxResults, next, first, last, previous and a bunch of other properties and methods to let you control the data. You can roll your own, but then you find yourself writing a bunch of code that is the same as the existing EntityQuery object code. The problem with the rich:dataScroller is that it works on the whole list at once. The EntityQuery queries the database for the number of rows in the result, and then only fetches the number of rows on a page. You can set up params in pages.xml to pass from one page to the next the values of the current page so you have a stateless viewer as opposed to keeping all items in memory (or keep reloading them) for the data scroller. Cheers, Andy View the original post : http://www.jboss.com/index.html?module=bbop=viewtopicp=4112971#4112971 Reply to the post : http://www.jboss.com/index.html?module=bbop=postingmode=replyp=4112971 ___ jboss-user mailing list jboss-user@lists.jboss.org https://lists.jboss.org/mailman/listinfo/jboss-user