View Full Version : DomHelper to create new collapsible Panel

22 Mar 2011, 7:02 AM

I'm new to ExtJs and I'm trying to create a collapsible panel and would like to insert it into the Dom. I'm doing it as follows:

this.foo_holder = Ext.DomHelper.append(document.body, [{id : 'testdiv'}]);

var fooPanel = {
xtype : 'panel',
height : 100,
title : 'fooPanel',
titleCollapse : true,
collapsed : true,
collapsible : true,
html : 'Blah Blah'

Ext.DomHelper.append(this.foo_holder, fooPanel);

However, it just shows up the html when the panel is inserted. I don't see any title bar or title or any collapsible functionality.
When I create the same panel before the dom is rendered, it shows up properly. But I need to add/remove panels later on.

Can anyone help ?