25 Nov 2008
by smith
edit
xn--6by35j.com
Add a non-Ext child control?
I have another "control" written by another party, that has nothing to do with ExtJS (and in fact is not written using the ExtJS library). This control has a method to be able to add itself into a DOM tree... So something like the "constructor" takes a DOM parent "thing" (node? element?) and then it creates its own div and then calls "appendChild" on the parent thing to add itself. My question is -- when can I do this with an ExtJS control?
For example, let's say I want it to appear within a FormPanel. Normally we construct our FormPanels by filling in the "items" collection. This doesn't seem to fit the paradigm I need -- I need to be notified when the ExtJS FormPanel has been fully "DOM-ified," and then I need to grab a DOM node from that and then pass it into the "constructor" of my other control...
Thanks in advance,
Mike Johnson
If your foreign-comp does an appendChild (as most do), use extComp.body.dom as an initial target. You may need to use Firebug to browse the DOM after render to select a more specific target.
Thanks in advance,
Mike
COMMENTS