我定义了一个代表树结构的类
GeographicalUnits = Ext.extend(Ext.tree.TreePanel, {
title: 'Регион / Город',
//rootVisible: false,
initComponent: function () {
this.root = {
text: 'Tree Node',
expanded: true
};
this.loader = {
url: 'API/GeographicalUnits/GetNodes'
};
GeographicalUnits.superclass.initComponent.call(this);
}
});
我以这种方式创建一个实例:
Ext.getCmp('MainTabs').openTab(new GeographicalUnits({
id: 'GeographicalUnitsCatalog'
}));
服务器响应是:
[{"text":"geo1","children":[{"text":"sub1","leaf":true},{"text":"sub2","leaf":true}]}]
它适用于 Chrome、firefox 和 Opera,但不适用于 IE 8。为什么?