I have a slider control on my (Composer) form and a dynamic data service that performs a complex calculation based on the value selected on the slider.
i would like to trigger the dynamic data service immediately after the user has finished manipulating the slider control. I.e. I'd like to avoid triggering the service n times while the user drags their finger up and down adjusting the slider.Can this be done?
I have tried this and the first way I tried is to use jQuery to put a blur handler on the slider handle only works when someone tabs on to the slider and doesn't work when clicking on to the field and dragging.
The second option was to make a business rule that sets a timeout and if another change happens within the timeout period, cancel the first timeout and create a new one
Then you can have a business rule that listens to "evtSliderUpdate" and you can get the slider value by using sfc.getRawValue(evt.evtSource). Make sure that this rule only runs on change events though. Adjust the timeout value as you see fit, it will not stop multiple calls but it will reduce the number of calls made.
Thanks Glenn, will try it out.