how to get html element id of smartgwt widgets?

左心房为你撑大大i 提交于 2019-12-10 18:59:42

问题


I want get html id of input field & icon field of a TextItem widget, how can i do this ??? (no getId methos is available for TextItem widget & seems that setAttribiute("id", "foo") has no effect)


回答1:


since everything is on a single page, i wouldn't dare to set any IDs yourself, the probability that you create two items (by mistake) with the same id is quite high. why would you need it anyway?

you may get the html element by name textItem.setName("foo"); DOM.getElementsByName("foo")



来源:https://stackoverflow.com/questions/2419008/how-to-get-html-element-id-of-smartgwt-widgets

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