The most easy way to get element by it's id - is to use RootPanel.get(id) method. But if you want to get the value of tag's id attribute, you have to use a getAttribute(String id) method, which returns a value of specified attribute!
On 1 июн, 23:31, markww <[email protected]> wrote: > Hi, > > Is there a way to get the id of a Node, or to just make a RootPanel > from a Node? I am doing this: > > RootPanel panel = RootPanel.get("foo"); > Element element = panel.getElement(); > for (int i = 0; i < element.getChildCount(); i++) { > Node node = element.getChildAt(i); > String id = node.getId(); // does not exist. > > // I want to do: > RootPanel curr = RootPanel.get(id); > } > > Right now, I need to know all ids in advance, that's the only way a > RootPanel can get() an element from the dom. I can't give it a Node. I > might be missing this completely. > > Thanks -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.
