Reputation: 1754
i'm new with Extjs and was wonder if there is an option to render a button inside a div in the template. I'm adding the files:
Ext.define('itfm.application.view.SystemStatusHeader', {
extend: 'Ext.panel.Header',
alias: 'widget.systemStatusHeader',
headingTpl: '<div><span id="{id}-textEl" class="{cls}-text {cls}-text-{ui}">{title}</span><span id="targetId"></span></div>',
subTitleTpl: '<div id="{id}-textEl" class="{cls}-text {cls}-text-{ui} {cls}-subtitle">{subtitle}</div>',
initComponent: function() {
var me = this;
if(me.subtitle) {
var tpl = new Ext.Template(me.subTitleTpl);
me.headingTpl = me.headingTpl.concat(tpl.apply({subtitle: me.subtitle,cls:'{cls}'}));
}
this.callParent(arguments);
if(me.btn){
renderTo:'#targetId'; --> how can i set it inside the div
}
}
Thanks in advance
Upvotes: 1
Views: 7405
Reputation: 59
This problem is described here:
There is a simple example code aswell.
Upvotes: 0