PDA

View Full Version : contentEl missing in 2.0



nmadhavan_1972@yahoo.com
11 Oct 2011, 9:50 PM
Is there any other mechanism to place an HTML element (created outside Ext using my javascript library) inside an Ext Component? Sencha Touch 1.1 provided a contentEl attribute which was useful for me.

regards,
Madhavan

TommyMaintz
12 Oct 2011, 7:21 AM
I think we missed porting this property when creating the new Component class. We will make sure to add this asap. For now I suggest you add the element to the component using:



var component = Ext.create('Ext.Component', {...config...});
component.innerElement.append(yourContentEl);

nmadhavan_1972@yahoo.com
12 Oct 2011, 7:49 AM
Thanks for the quick response. You guys are really awesome.

Madhavan

pagameba
3 Nov 2011, 12:43 PM
I was looking for this too, thanks for the hint. I just added


initialize: function() { this.innerElement.append(this.getContentEl()); }

to my panels and set the contentEl in the config.