Overriding Slider behaviour

Hi,

I want to have Slider with new feature - it can has values only from given set of integers. (Not contionus slider)
I have created my
CustomSlider
class which extends
Slider
class. It overrides
setValue(Double value, boolean repaintIsNotNeeded)
, in that way, that it sets
newValue
from given set of values and then calls
super.setValue(new Double(newValue), repaintIsNotNeeded);
.

Problem is, that this is not working -
CustomSlider
is continous.
Why? Is there another method called to determine
Slider
value on user action?

Ok, maybe simpler question:

When I am invoking
slider.setValue()
it changes internal field
value
but not graphical representation of slider.
How to move slider to given value from server side?

Maybe you are changing it from a background thread - in that case see
this thread
.

Also, you might want to use setImmediate(true) to make sure any user changes are immediately communicated to the server.

Thank you for your answer,
setImmediate
was the reason of my failure.

Another question:
When I am writing class, that extends standard Vaadin slider can I somehow change label inside that popup above handler? Or is it completly in power of GWT VSlider?
I want to map it (for example: 1 → a, 2 → b, etc…)

It is handled on the client side (VSlider.setFeedbackValue()) - not easily extensible so you would effectively need a copy of VSlider to modify this.