私のアプリケーションでは、次のコードをxtypeとして使用しています。私のリストアイテムは、私が望む方法で表示されますが、アイテムをクリックすると、毎回このエラーが発生します。データを含む新しいページをロードするアイテムをクリックします。Uncaught TypeError:Object function(){h.apply(this 、arguments)}にはメソッド 'setActiveItem'がありません。どのように私はそれを修正することができますの任意のアイデア?レファランスされたアイテムの行は、コード内でコメントされています。ここでSencha:Uncaught TypeError:オブジェクト関数(){h.apply(this、arguments)}に 'setActiveItem'メソッドがありません
が私のコードです:カップル操作後
var AppsBack = new Ext.Toolbar({
dock: 'top',
items: [{
text: 'back',
ui: 'back',
handler: function(){
Home.setActiveItem('home'); //Here is the second problem
}
}]
});
var AppsDetails = new Ext.Panel({
id: "appsdetails",
tpl: "{game}",
dockedItems: [AppsBack]
});
var AppsList = new Ext.List({
id: "appslist",
store: AppsStore,
layout: 'card',
emptyText: "No game found",
itemTpl: "{game}",
listeners: {
itemtap: function(view, index, item, e) {
var rec = view.getStore().getAt(index);
AppsDetails.update(rec.data);
AppsBack.setTitle(rec.data.game);
Home.setActiveItem('appsdetails') //Here is the first problem
}
}
});
var AppsListWrapper = new Ext.Panel({
id: "appslistwrapper",
layout: 'card',
items: [AppsList],
dockedItems: []
});
var Home = Ext.extend(Ext.Panel, {
id: "home",
iconCls: 'home',
title: 'Home',
fullscreen: true,
layout: 'card',
cardSwitchAnimation: 'slide',
initComponent: function() {
Ext.apply(this, {
items: [AppsListWrapper, AppsDetails]
});
Home.superclass.initComponent.apply(this,arguments)
}
});
Ext.reg('appsList', Home);
ご協力いただきありがとうござい
、私は私はので、私はこのトラブルを経験しています唯一の理由があることを発見しましたパネルを延長しようとしている。他の点では、私はintead Ext.extend(Ext.Panel、{... すべてがうまく私はこのケースでXTYPEを使用することはできません除外機能します。任意のアイデア?