一度に2つのPanelインスタンスを作成できるようにしたいのですがnew Dashboard.NotificationPanel(); new Dashboard.NotificationPanel();
、最初のインスタンスのようなことをすると、グリッド結果が表示されません。私はそれが何らかの形でinitComponentステージに関連していると思います、特に両方のオブジェクトは参照によって同じストアオブジェクトを使用します。私が間違っている場合は訂正するか、間違いを指摘してください。前もって感謝します。
Dashboard.NotificationPanel = Ext.extend(Ext.grid.GridPanel, {
columns: [...],
view: new Ext.grid.GridView({
forceFit: true,
enableRowBody: true,
ignoreAdd: true,
emptyText: 'No Notifications to display'
}),
initComponent: function () {
var store = new Ext.data.Store({
url: '...',
autoLoad: true,
reader: new Ext.data.XmlReader({
record: 'result',
id: 'id'
}, ['c_case_number', 'c_creator', 'c_date_created', 'c_notification_condition', 'c_message'])
});
var config = {
store: store,
bbar: new Ext.PagingToolbar({
pageSize: 10,
store: store,
displayInfo: true,
displayMsg: 'Displaying notifications {0} - {1} of {2}',
emptyMsg: "No Notifications to display"
})
}
Ext.apply(this, Ext.apply(this.initialConfig, config));
Dashboard.NotificationPanel.superclass.initComponent.call(this);
}
});