OpenFaces icon indicating copy to clipboard operation
OpenFaces copied to clipboard

Calling setValue() on a Slider changes the value of the textField but not the slider

Open openfaces opened this issue 10 years ago • 0 comments

Candace Bain I have two slider components and need to ensure that the value of one is not greater than the value of the other. I added an onchange handler that uses getValue() and setValue() on the sliders to enforce this constraint.

Behavior: calling setValue() with a new value changes the value of the slider's textField but does not change the slider location. Expected behavior: I would expect calling setValue() to update both the textField and the slider location.

I looked through slider's javascript and was able to work around this by calling redisplayHandle() on the slider after I call setValue() on it. It would be nice if setValue() called redisplayHandle(), or if not it would be nice if redisplayHandle() were documented. Thanks!

openfaces avatar Mar 11 '14 16:03 openfaces