Threaded View

  1. #1
    Sencha User
    Join Date
    Feb 2012
    Posts
    26
    Answers
    1
    Vote Rating
    1
    MrBeef is on a distinguished road

      0  

    Default Answered: JSON load to DataView doesn't work

    Answered: JSON load to DataView doesn't work


    Any mistakes in the following code? I've been trying again and again but my JSON load doesn't work...I just see "Loading..." for several seconds then just a blank screen. I've tried loading via AJAX too, but that doesn't show the "Loading..." screen. Thanks in advance for the assistance.

    Sample of my JSON data:

    Code:
    {"households":[{"HHName":"Jim Smith Household"}])
    Code:
    Ext.regModel('Household', {
        fields: [
            {name: 'HHName',    type: 'string'}
        ]
    });
    
    var store = Ext.create('Ext.data.Store', {
            model    : 'Household',
            proxy: {
                type: 'jsonp',
                url: 'get_households.php',
                reader: {
                    type    : 'json',
                    root: 'households'
                }
            },
            autoLoad: true
        });
    
    var list = Ext.create('Ext.DataView', {
            store: store,
            itemTpl: '<p>household name is {HHName} </p>'
        });

  2. You are using JsonP so is the response valid for JsonP?

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar