Probably the safest thing to do would be to insert an element, then  
use the widget's .wrap() method to "promote" that element to a widget.


there are other ways, but they are prone to leaking memory.

-jason

On Jun 10, 2009, at 1:36 PM, peterk wrote:

>
> Hey all,
>
> I'm walking the DOM tree and would like to append a Widget to certain
> nodes where certain conditions are met, but I'm not having much
> success.
>
> appendChild expects a Node as its parameter, so I can't just append a
> type of Widget. It will accept Widget.getElement() as a parameter, but
> this leads to runtime errors.
>
> Is it possible to mix Widgets with the DOM like this or is the only
> way to add Widgets to a page via the RootPanel.get() ..? If so is
> there a way to add Widgets to the page based on a desired position in
> the DOM?
>
> I'd like to use a custom widget I've made, having everything wrapped
> neatly in a class, and not have to revert to lower level stuff..
>
> Thanks for any help :)
> >


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