0

Paginated Grid with filters

asked 2015-10-12 14:28:32 +0800

WilliamB gravatar image WilliamB
1609 1 6

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.

delete flag offensive retag edit

Comments

Do you use spring data?

chillworld ( 2015-10-12 15:19:04 +0800 )edit

We use Spring JPA

WilliamB ( 2015-10-12 20:28:01 +0800 )edit

2 Answers

Sort by » oldest newest most voted
0

answered 2015-10-12 18:12:30 +0800

Darksu gravatar image Darksu
1991 1 4

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

link publish delete flag offensive edit

Comments

Thank you, gonna check it out! and let you know how I fare.

WilliamB ( 2015-10-12 20:34:16 +0800 )edit
0

answered 2015-10-12 20:34:42 +0800

chillworld gravatar image chillworld flag of Belgium
5367 4 9
https://github.com/chillw...

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.

link publish delete flag offensive edit
Your answer
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow
1 follower

RSS

Stats

Asked: 2015-10-12 14:28:32 +0800

Seen: 41 times

Last updated: Oct 12 '15

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More