私は新しいExtJSユーザーであり、質問があります。
車のある店があり、ブランドやモデルごとにすべての車を表示するボタン付きのメニューを作成しています。
次に、特定のブランド/モデルのすべての車を含むグリッドパネルのあるウィンドウを表示したいと思います。実際、ボタンを作成するときは次のようにします。
var aCarButton = Ext.create('Ext.Button', {
text: aTextButton,
handler: function() {
var aResultWindow = new ResultWindow(aTextButton, myCarStore, 'Brand', aBrandValue);
aResultWindow.create();
}
});
aMenuPanel.add(aCarButton);
私の機能のために私はそれをします:
function ResultWindow(aTitle, aStore, aFilter, aFilterValue) {
this.myTitle = aTitle;
this.myStore = aStore;
this.myFilter = aFilter;
this.myFilterValue = aFilterValue;
this.myStore.filter(aFilter, aFilterValue);
}
ResultWindow.prototype.create = function() {
var grid = Ext.create('Ext.grid.Panel', {
store: this.myStore,
columns: [
...
]
});
var window = Ext.create('Ext.window.Window', {
layout: 'fit',
maximizable: true,
title: this.myTitle,
items: [ grid ],
width: 1024,
height: 768
});
window.show();
}
まず、それが私が欲しいものを表示するための最良の方法であるかどうかはわかりません。
次に、すべての車(フィルターなし)を表示するボタンがありますが、12000年のすべてのレコードを表示するには約2分かかります。
だから私の最初の質問は、私が欲しいものを表示するための私の解決策が正しいかどうかを知ることです?
そして、私の2番目の質問は、すべての車をより速く表示できるかどうかです。
PS:エラーが発生した場合は、英語で申し訳ありません。