上部にドッキングされたツールバーに検索フィールドを含むナビゲーションビューがあるタブパネルに検索アイコンを追加しました。私の質問は、検索フィールドから値を取得し、一致するものを見つけるためにストアに送信したいということです。一致するものがあれば、それらのアイテムを検索フィールドツールバーの下のリストに表示したいです。私は多くの検索を行いましたが、私に役立つ関連例が見つかりません。どんな種類の助けもいただければ幸いです。
これが私の見解です..
items: [{
xtype: 'toolbar',
docked: 'top',
style: 'background:darkgray',
items: [{
xtype: 'searchfield',
placeHolder: 'Search... '
}, {
xtype: 'button',
iconCls: 'search',
iconMask: true,
ui: 'confirm',
action: 'search-app'
}]
}, {//here I want to show my filtered data
xtype: 'list',
itemId: 'searchlist',
store: 'SearchItemStore',
onItemDisclosure: true,
emptyText: 'No data found!',
itemTpl: '{Name}'
}]
私のコントローラーでは、ボタンを呼び出して、次のような関数を追加しています。
mySearchFunction: function(element , e, eOpts) {
var searchPattern = this.getSearchFieldAction().getValue();
var store = Ext.getStore('ProductStore');
// here I want to set the param that has to send to the store proxy..I am really not sure how this works
store.find(fieldName, value, [startIndex], [anyMatch], [caseSensitive], [exactMatch] );
}