ok thank you. I had been doing : String s = getServerHTML(); DOM.getElementById("id").setInnerHTML(s); // woops
"id" is an id to a Panel in the hierarchy. I didn't know how to set its innerHTML without using the DOM class. >From there, I was using Dom methods to get the <div> I wanted to append a child to, and that's when the various attach and detach issues came up. Pain and suffering. Instead of using an HTMLPanel to replace the div inside the html, I used an HTMLPanel as content to the whole server html. From there, I just hooked up things as normal. HTMLPanel htmlpanel = new HTMLPanel( getServerHTML() ); simplePanel.add(htmlpanel); When I want to take over some part of the server's html: htmlpanel.add(someElement, "someID"); Now I've got -no- subclassed widgets nor panels, handlers fire, so I'm assuming everything is hooked up correctly. Thanks much. On Oct 5, 10:26 am, Thomas Broyer <t.bro...@gmail.com> wrote: > On Oct 5, 4:13 pm, Brian <hibr...@gmail.com> wrote: > > > What's odd (ie, I don't get this stuff yet) is the HTMLPanel's > > onAttach doesn't get called when htmlpanel.add() is called. > > Of course. It'll be called when adding the HTMLPanel into a container > widget. > > > Soo.. instead of wrapping the widget, it seems better to wrap the > > HTMLPanel and call onAttach on the panel itself, and add it to > > RootPanel.detachOnWindowClose(). > > How are you showing/displaying your HTMLPanel ?!?! -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To post to this group, send email to google-web-tool...@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.