I'm trying to add extjs components to tpl panel. Is there anyway to insert component to tpl like this
I'm trying to add extjs components to tpl panel. Is there anyway to insert component to tpl like this
Try this
Ext.create('Ext.panel.Panel', { renderTo: Ext.getBody(), data: {}, listeners: { refresh: function() { var renderSelector = Ext.query('div.comment-add-textarea'); for (var i in renderSelector) { Ext.create('Ext.form.field.TextArea', { height: 300, renderTo: renderSelector[i] }); } } }, tpl: Ext.create('Ext.XTemplate', '<tpl for=".">', '<div class="comment-add-textarea"></div>', '</tpl>', { compiled: true }) });