this.getSecondPanel = function(argPanel, argID)
{
Ext.Ajax.request({
url : 'myActionURL',
params : {id: argID},
success : function(response)
{
var resData = Ext.util.JSON.decode(response.responseText);
var totalCount = resData.totalCount;
argPanel.items.insert(0, this.getTotalCountPanel(totalCount));
},
failure : function(response)
{
Ext.Msg.alert('Error: ', response);
}
});
};
this.getTotalCountPanel = function(argCounter)
{
return new Ext.Panel({
title : 'Summary Panel',
html : '<table class="bgrGREYlight" width="100%" style="padding:5">' +
'<tbody>' +
'<tr>' +
'<th align="left" width="20%" class="tableTEXT2">' + Total Count + '</th>' +
'<td width="80%" align="left" class="tableTEXT">' + argCounter + '</td>' +
'</tr>' +
'</tbody>' +
'</table>'
});
};
当我运行上面的代码时,它给出了
TypeError:this.getTotalCountPanel 不是函数
错误。我想这是一个范围问题。我该如何解决这个错误?