java - Setting HTML tags with GWT -
i'm running test automation software rely on "id" tags recognize controls.
i'm developing in java on eclipse using gwt plugin , have tried using both of below methods set id tag button "add".
add.setid("addid");
dom.setelementattribute(add.getelement(), "id", "addid");
neither of these modifying id property correctly. have had problem before or know workaround?
thank help!
jerry
if remember correctly, several browsers (or internet explorer) won't let set dom element's id after has been appended dom. limitation there if directly doing hand coded javascript. browser won't show error on setting id attribute won't update attribute either.
so need set id before appending element dom.
edit
from discussion below appears assuming setting id on button widget's dom element set id on <input type="button">
dom element. assumptions not proving correct because button widget wraps <input type="button">
dom element in other dom elements (like table or div).
edit
you may want try button.wrap(element)
method if want customize input type="button">
element. first create (dom.createbutton()) or locate dom element, set it's id, , wrap using button.wrap(element)
Comments
Post a Comment