1. #1
    Sencha User
    Join Date
    Nov 2008
    Location
    Pune
    Posts
    43
    Vote Rating
    0
    tameshwar is on a distinguished road

      0  

    Default Ext.JsonStore one field is coming null

    Ext.JsonStore one field is coming null


    Hi,

    I have a jsonStore which is having 6 fields and 200 records, its working fine, but somehow one field of jsonStore is coming null, when i print the json it is coming null in one field but in the database it has the data,.
    ===============================
    PHP Code:
    var URLdata 'php_file/jsonRecord.php';
    var 
    storedata = new Ext.data.JsonStore({
    fields: ['hnum''hcity','hstate' ,'hname' ,'hportal','hprocessing']
    ,
    root'hjsonObj'
    ,proxy: new Ext.data.HttpProxy({url:URLdatamethod:'GET'})});
    storedata.load(); 
    ============================

    Please help me out.
    Thanks

  2. #2
    Sencha User
    Join Date
    Jan 2011
    Posts
    546
    Vote Rating
    53
    willigogs is a jewel in the rough willigogs is a jewel in the rough willigogs is a jewel in the rough

      0  

    Default


    If you're checking the returned raw JSON string from the server, and it doesn't include one entire column of records, then I would suggest something is going wrong in your middle / back end code, and not inside EXTJS.

    To check your raw json data:
    Code:
    var URLdata = 'php_file/jsonRecord.php';
    
    
    var storedata = new Ext.data.JsonStore({
        fields: ['hnum', 'hcity','hstate' ,'hname' ,'hportal','hprocessing'],
        root: 'hjsonObj',
        proxy: new Ext.data.HttpProxy({
            url:URLdata, 
            method:'GET'
        }),
        listeners: {
            load: function(thisStore, records, o) {
                console.log(Ext.encode(thisStore.reader.jsonData))    
            }
        }
    });
    
    
    storedata.load();

  3. #3
    Sencha User
    Join Date
    Nov 2008
    Location
    Pune
    Posts
    43
    Vote Rating
    0
    tameshwar is on a distinguished road

      0  

    Default


    Hi Willigogs.

    Thank for you quick response.

    Yes it is back end problem.

    Once again Thanks.

Thread Participants: 1