raghuprassad
16 Sep 2012, 2:05 AM
Hi Team,
I am trying to call a XTemplate function on my panel using the panel id, but its not getting called.
I am passing an Array of records into a function and that function containing the XTemplates, i need to print the Array values in a table XTemplates function is not getting called.Although the method containing the XTemplate printing the Array record on console. Here is my code:
items : [{
height:'330',
id:'statusId',
tpl:'statusTpl',
flex : 6,
frameHeader:false,
bodyStyle:'border-top:none;border-bottom:none;border-left:none;border-right:none;',
unstyled : true,
padding: '0 20 0 0'
}],
statusDataLoad: function(records) {
console.log(records[0].get('impact'));
var statusTpl = new Ext.XTemplate(
'<h1>Test</h1>',
'<table align="top"><tr>',
'<tpl for=".">',
'<td ><b>{0}</b></td></tr>',
'</tpl>',
'</table>'
);
statusTpl.overwrite(Ext.getCmp('statusId').body,records);
},
});
I am calling the function statusDataLoad: function(records) from controller, function is getting called.
I have written the first line of XTemplate function '<h1>Test</h1>', even it is not getting printed, Please help me out to figure out the mistake i am making.
I am trying to call a XTemplate function on my panel using the panel id, but its not getting called.
I am passing an Array of records into a function and that function containing the XTemplates, i need to print the Array values in a table XTemplates function is not getting called.Although the method containing the XTemplate printing the Array record on console. Here is my code:
items : [{
height:'330',
id:'statusId',
tpl:'statusTpl',
flex : 6,
frameHeader:false,
bodyStyle:'border-top:none;border-bottom:none;border-left:none;border-right:none;',
unstyled : true,
padding: '0 20 0 0'
}],
statusDataLoad: function(records) {
console.log(records[0].get('impact'));
var statusTpl = new Ext.XTemplate(
'<h1>Test</h1>',
'<table align="top"><tr>',
'<tpl for=".">',
'<td ><b>{0}</b></td></tr>',
'</tpl>',
'</table>'
);
statusTpl.overwrite(Ext.getCmp('statusId').body,records);
},
});
I am calling the function statusDataLoad: function(records) from controller, function is getting called.
I have written the first line of XTemplate function '<h1>Test</h1>', even it is not getting printed, Please help me out to figure out the mistake i am making.