【发布时间】:2026-02-08 22:10:02
【问题描述】:
我想稍微修改默认的树面板渲染器。所以在第一步中,我尝试只调用默认的树面板渲染器。不幸的是,这不起作用。
这是我的代码:
Ext.define('FMSGui.view.FMSFeatureTypeTreePanelColumn',
{
extend: 'Ext.tree.Column',
dataIndex: 'name',
flex:1,
renderer: function(v1)
{
return this.callParent(v1);
}
}
);
TreePanel 的代码如下所示:
Ext.define('FMSGui.view.FMSFeatureTypeTreePanel', {
extend: 'Ext.tree.Panel',
title: 'Feature Types',
width: 200,
height: 150,
store: null,
displayColumn:null,
constructor: function(config)
{
this.displayColumn=Ext.create("FMSGui.view.FMSFeatureTypeTreePanelColumn");
this.columns=[this.displayColumn];
this.store=Ext.create("FMSGui.store.FMSFeatureTypeTreeStore");
this.store.load();
this.superclass.constructor.call(this,config);
},
rootVisible: true,
lines: true,
useArrows: true
});
我总是收到错误消息:
XTemplate 评估异常:this.callParent 不是函数
顺便说一句,如果我删除渲染器部分。
知道这里出了什么问题吗? 感谢您的意见。
【问题讨论】:
-
没有人知道吗?可惜还是没能解决。