Re: Dispatch with @delay firing multiple times

Posted by Alessandro Vernet on
URL: https://discuss.orbeon.com/Dispatch-with-delay-firing-multiple-times-tp3649476p3653141.html

Dan,

This is because every time you click on the trigger, it starts a new sequence of "dispatch timer every 10 s", which happens in parallel to other sequences. I am not sure what you're trying to do, but if you'd like to have just one event every 10 s, and this to start the first time the button is pressed, when the button is pressed, set a flag in an instance, and before that dispatch the "timer" event only if the flag hasn't been set. This way, the second time the trigger is activated, you won't dispatch the event again.

Alex
--
Follow Orbeon on Twitter: @orbeon
Follow me on Twitter: @avernet