-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Greetings,
Until now I've done like the ZK exemple, loaded all my data in a query and let the listmodel do the pagination.
However that requires having ALL the data in memory and I want to avoid that.
IS there a simple way to:
1°) Have dynamic paginated listmodel which does query in database to only retrieve content of the current page? With dynamic number of row based on the size of the screen?
2°) How to add a dynamic filter component on top of it which would also trigger a new query in database once a filter value is inputed? Instead of filtering manualy in the VM.
Hello WilliamB,
Some very good sources for information can be found at the following url's:
http://books.zkoss.org/wiki/SmallTalks/2011/March/Sortinghugedatausing_ZK
http://books.zkoss.org/wiki/SmallTalks/2009/May/PagingSortingwithafilterobject
Using hibernate and spring will help a lot!
If you need more info or an example please let me know.
Best Regards,
Darksu
Hey William.
Spring can work with paging.
I suggest you add queryDSL or Specifications to it.
Some sample code I can give you next week, but here is already some link to it..
You just set your own paging element above your listbox and control it yourself with the vm.
Greetz chill.
Asked: 2015-10-12 14:28:32 +0800
Seen: 41 times
Last updated: Oct 12 '15
Do you use spring data?
chillworld ( 2015-10-12 15:19:04 +0800 )editWe use Spring JPA
WilliamB ( 2015-10-12 20:28:01 +0800 )edit