Add value feedback to PaperSlider

Hey,

I followed the tutorial to add a Java API to the paper-slider component.

However, I would like to extend it with the feature that previews the to be selected value while the user is sliding it.
I was thinking about just adding a label next to the slider to display the value while the user is dragging.

Is there a way to send the value immediately to the server? And not just when the user releases the slider control.

Thank you.

Kristof.

Got it!

@DomEvent(value = "immediate-value-change")
	public static class ImmediateValueChangeEvent extends ComponentEvent<PaperSlider> {

		private int value;

		public ImmediateValueChangeEvent(PaperSlider source,
										 boolean fromClient,
										 @EventData("element.immediateValue") Integer immediateValue) {
			super(source, fromClient);
			this.value = immediateValue;
		}

		public int getValue() {
			return value;
		}

	}

It took me some time to realise that it needed to be element.immediateValue in @EventData, not element.value.

I love how this works!

Kristof.