Doesn't this work Rootpanel.get("MyIDName").add(widget);

I've managed to insert HTML with clickhandlers like this

On Mar 18, 3:04 pm, Thomas Broyer <[email protected]> wrote:
> On Mar 17, 8:07 pm, Stefan Ballmer <[email protected]> wrote:
>
> > On Mar 17, 10:46 am, Thomas Broyer <[email protected]> wrote:
>
> > > Have a look at the javadoc for the "attach" and "detach" related
> > > methods in the Widget class; and then look at the code for, e.g.
> > > HTMLPanel, HTMLTable, CellPanel, etc.
>
> > Thanks for the hint. Seems that the only sane way to do this is to
> > subclass the Widget and to make onAttach public. After attaching the
> > Element to the DOM it's sufficient to call onAttach() on the widget.
>
> No actually, the "sane way" would be to do your DOM-related things
> from within a Widget subclass, which would therefore have access to
> the onAttach methods of the widget you try to add as a child.
>
> > Additionally it seems to be also required to call
> > RootPanel.detachOnWindowClose(widget) to prevent mem leaks - but I'm
> > not 100% sure.
>
> Not if you call the widget's onDetach when you actually detach the
> widget (either directly the widget's getElement() or some ancestor
> element)

-- 
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.

Reply via email to