I want to include a HTML button or an Ext.button.Button inside rowBodyTpl from Grid RowExpander plugin.

I wrote the code bellow but it is not working:

plugins: [
ptype: 'overriderowexpander',
pluginId: 'overriderowexpanderId',
rowBodyTpl: new Ext.XTemplate(
'<p><b>Nume produs:</b> {numemarfa}</p>',
'<p><b>Locatia:</b> {locatia}</p>',
'<p><b>Cantitate produs:</b> {cantitate}</p>',
'<p><b>Unitate masura:</b> {um}</p>',
'<p><b>Cod bara:</b> {codbara}</p>',
'<p><b>Cod bara nou:</b> {codbara_nou}</p>',
'<p><b>Locatia noua:</b> {locatia_nou}</p>',
'<div style="width: 100%; margin-right: 50px; text-align: right;">',
'<button onclick="this.onMarkResolvedClick({id}, {idbaza})">',
'Marcheaza ca rezolvat',
onMarkResolvedClick: function(id, idbaza) {
alert("ID: " + id + " --- IDBAZA: " + idbaza);



What I'm doing wrong and how to implement that?

Thanks in advance!