1. #1
    Sencha User
    Join Date
    Sep 2012
    Posts
    21
    Vote Rating
    0
    mystere13 is on a distinguished road

      0  

    Default Unanswered: Null remoteFilter

    Unanswered: Null remoteFilter


    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

  2. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    St. Louis, MO
    Posts
    33,677
    Vote Rating
    435
    Answers
    3110
    mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of mitchellsimoens has much to be proud of

      0  

    Default


    From this code there is no null filter. I would set a breakpoint in the filter method to see what's going on.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    http://www.JSONPLint.com - Source to lint your JSONP!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is almost in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha User
    Join Date
    Sep 2012
    Posts
    21
    Vote Rating
    0
    mystere13 is on a distinguished road

      0  

    Default


    Hello,

    What IDE do you use? Which one is breakpoint able and efficient for Sencha dev?

    Thanks

    Jo