Hi All,

There is tpl tag for a container where the html is getting prepared. I want to fire an click event for the template .How can i achieve this?


Code Snippet:


{
xtype:'container',
cls:'post-body-cont',
// id : me.getId()+'-header',
data:{'message':me.msg,'lastmoddate':me.lastmodifi ed,splitbuttonhtml:me.splitButtonHtml },
tpl:new Ext.XTemplate(' <div id = '+me.getId()+'-header onClick = '+this.something()+'><span style="margin- left:20px;"> {message}</span>' +
'<div style="float:right;" >{splitbuttonhtml}</div>'+
'<img border="0" data-qtip=" collapse" data-qclass="seek-qtip"'+
' src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" '+
'class="x-wtc-link-btn expanding" style="float:right;">' +
'<img border="0" data-qtip="REPLY" data-qclass="seek-qtip" '+'src="data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==" '+
' class="x-wtc-link-btn reply" style="float:right;" >'+
'<label class="x-component x-component-default" style="float:right;margin-right:8px;border-width:0;"> {lastmoddate}</label> </div>'
,{ compiled:true,
getcontextMenu:function(){
return '<span>getContextMenu</span>';
}

})




}


Any help is highly appreciated.