问题
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