1 Matching Annotations
  1. Sep 2017
    1. By default, neither the browser nor GWT creates default id attributes for widgets. You must explicitly create an id for the elements you want to refer to in this manner, and you must insure that each “id” value is unique. A common way to do this is to set them on static elements in your HTML host page <div id="my-button-id"/> To set the id for a GWT widget, retrieve its DOM Element and then set the id attribute as follows: Button b = new Button(); DOM.setElementAttribute(b.getElement(), "id", "my-button-id")