I set up a PrimeFaces p:timeline
, after each zoom in or zoom (event : changed) start method that read some database. i have a issue with this operation, users mostly zoom fiew levels in. So they click button for example several times in a row. For example they would like zoom from days to minutes, so they click button 4, 5 times in a row. After every click starts methods that read a database, and this is an issue for me. This causes system delays. Is it possible somehow to wait with event :changed until user stops zooming?
Asked
Active
Viewed 262 times
0
-
PrimeFaces has ajax delay, but I'm not sure if you receive the right information in the final event (the real zoom factor) – Kukeltje Sep 21 '19 at 09:53
-
It's good to have someone smarter to get advice. Problem solved, thank you. – Eiten Sep 22 '19 at 08:16
-
Please create an answer yourself if the plain delay was not enough. Otherwise I'll find a duplicate – Kukeltje Sep 22 '19 at 10:22
1 Answers
1
Problem solved, solution: add a ajax delay to rangechanged event:
<p:ajax event="rangechanged" delay="#{schedulerControler.delay}" listener="#{schedulerControler.update}" />
Bean:
private long delay = ((long) (100 * 10));

Eiten
- 73
- 8