i have a Ext.Store with static data. To filter with one param is no problem, but how can I apply multiple filters?
In API Store.filter is defined as (filter,value) so i don't no how to apply more like
company:ba,city:be etc.
vg Steffen
--------------------------------------
Release Manager of TYPO3 4.5 energlobe.de - german online magazine
i would like to, but i don't know how to use. In Doku it's only declared by function with 2 args.
What have i to do - validate each record and return true or false?
vg Steffen
--------------------------------------
Release Manager of TYPO3 4.5 energlobe.de - german online magazine
* fn : Function
The function to be called, it will receive 2 args (record, id)
* scope : Object
(optional) The scope of the function (defaults to this)
Filter by a function. The specified function will be called with each record in this data source. If the function returns true the record is included, otherwise it is filtered.
The specified function will be called with each record in this data source. If the function returns true the record is included, otherwise it is filtered.
This was the point what was not clear, now i know, thx animal.
vg Steffen
--------------------------------------
Release Manager of TYPO3 4.5 energlobe.de - german online magazine
I'd like to preface this by saying that I am an EXT noob... and have really only been using the library for a few days now.
That being said, I am also looking to apply multiple filters, but I was hoping to apply them in stages. ie. User does a search for something and the data is filtered, then the user does a second search on the already filtered data.
I was hoping that you could simply do subsequent filterBy calls on the data store, but this appears to not be the case. My second filterBy seemingly searches ALL records [even ones previously filtered out].
Following code:
var store = Ext.data.StoreManager.get("SampleStore");
store.filterBy(function (record) //scope is optional so I dint use it.
{
return (record.get("Name") == "Jack");
});