Search code examples
gwtrangeuibinder

GWT How can I access HTML5 variable


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...


Solution

  • A possible solution could be:

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

    Hope that helps.