rsqw
24 Nov 2011, 4:22 AM
Hi,
I have a problem with store filtering:
I have Ext.view.View( shows only one item from the store at the one monent),
The idea is to show store-item, then if user wants to see another item, I'll load it to store, and filter the store, and when user returns back to prev-record it will should be fetched from store.
in my controller I try to do this
store.clearFilter(true);
//store.getCount() === 0 ???? why???
if(!store.findRecord('itemId', myItemId)) {
store.load({
addRecords: true,
params: {
itemId: myItemId
}
})
}
store.filter('itemId', myItemId);
my store has an option filterOnLoad: true;
I have a problem with store filtering:
I have Ext.view.View( shows only one item from the store at the one monent),
The idea is to show store-item, then if user wants to see another item, I'll load it to store, and filter the store, and when user returns back to prev-record it will should be fetched from store.
in my controller I try to do this
store.clearFilter(true);
//store.getCount() === 0 ???? why???
if(!store.findRecord('itemId', myItemId)) {
store.load({
addRecords: true,
params: {
itemId: myItemId
}
})
}
store.filter('itemId', myItemId);
my store has an option filterOnLoad: true;