Hi,
Here is my code snippet:
Code:
var adsStore = Ext.getStore("AdsStore");
adsStore.set('remoteFilter', true);
adsStore.filter(Ext.util.Filter({property: 'type', value: 'LK',}));
adsStore.load();
The store:
Code:
Ext.define('App.store.AdsStore', {
extend: 'Ext.data.TreeStore',
requires: [
'App.model.AdModel',
'Ext.data.proxy.Rest'
],
config: {
model: 'App.model.AdModel',
proxy: {
type: 'rest',
url : 'http://server/api/ad/?format=json',
reader: {
type: 'json',
rootProperty: 'items'
},
},
},
});
The model:
Code:
Ext.define('App.model.AdModel', {
extend: 'Ext.data.Model',
config: {
fields: [
{name: 'model', type: 'string'},
{name: 'count', type: 'int'},
{name: 'id', type: 'int'},
{name: 'price', type: 'auto'},
{name: 'sku', type: 'string'},
{name: 'text', type: 'string'},
{name: 'description', type: 'string'},
{name: 'geoPointId', type: 'float'},
{name: 'create_date', type: 'auto'},
{name: 'update_date', type: 'auto'},
{name: 'start_date', type: 'auto'},
{name: 'end_date', type: 'auto'},
{name: 'type', type: 'string'},
],
},
});
Here is the URL:
http://server/api/ad/?format=json&_dc=1355915009038&node=AdsStore-root&page=1&start=0&limit=25&filter=[{"property"%3Anull%2C"value"%3Anull}%2C{"property"%3A{"property"%3A"type"%2C"value"%3A"LK"}%2C"value"%3Anull}]
Why are there additional null filters ?
Thank you
Jo