I added search icon to my tab panel which has navigationview containing searchfield in the tool bar docked top. My question is I want to getvalue from the searchfield and send it store to find the match..if there is any match I want those items to be displayed in the list below the searchfield tool bar. I did lot of search but I cant find any relevant example that helps me. Any kind of help would be appreciated.
Here is my view ..
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}'
}]
In my controller I am calling the button and adding the function like this:
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] );
}