GWT How can I access HTML5 variable

145 Views Asked by At

I do have a line in ui.xml for horizontalsliderbar (HTML5).

Test.ui.xml

<input ui:field="slider1" type="range" min="0" max="100" value="30"
            step="10""></input>

Test.java

@UiField
InputElement slider1;

How can I get/set to value, min, max and so on...

1

There are 1 best solutions below

0
On BEST ANSWER

A possible solution could be:

slider1.setAttribute("min", "0");
slider1.setAttribute("max", "100");
slider1.setAttribute("value", "30");
slider1.setAttribute("step", "10");

Hope that helps.