1
0
-1

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? 

    CommentAdd your comment...

    1 answer

    1.  
      1
      0
      -1

      Hi Matt,

      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.

      1. Matthew van Bockel

        Thanks Glenn, will try it out.

      CommentAdd your comment...