How can I set id for GWT widgets in UiBinder?

。_饼干妹妹 提交于 2019-11-29 02:12:17

Check an availability of the following line in your module file (*.gwt.xml ):

<inherits name="com.google.gwt.user.Debug"/> 

And call the ensureDebugId(Element, id) method in your code:

login.ensureDebugId(login.getElement(), "loginButton");
Croo

Adding ID is not possible. This problem is also filed as a bug report and closed as "as designed". For details, see:

http://code.google.com/p/google-web-toolkit/issues/detail?id=4176

But you can add a debugId if you add <inherits name="com.google.gwt.user.Debug"/> to your *.gwt.xml file.

See Mapping ui:field in GWT to generated code

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!