本帖最后由 Foreign_Key 于 2015-02-02 16:30:04 编辑

解决方案 »

  1.   

    store -> proxy- > reader -> root
      

  2.   

    这种格式的字符串需要配置Root属性
    items:[{"userName":"18565877864","userPwd":"000000","userMobilePhone":"15914005524","userAddr":"China","userParentID":3,"userAuthor":1099511562241,"userIntroduce":"GpsServiceTesting","userType":3},{"userName":"zfp1","userPwd":"000000","userMobilePhone":"15914001003","userAddr":"ChinaGuangdongShenZhen","userParentID":3,"userAuthor":0,"userIntroduce":"GpsServiceTesting","userType":3},{"userName":"zfp2","userPwd":"000000","userMobilePhone":"15914001004","userAddr":"ChinaGuangdongShenZhen","userParentID":3,"userAuthor":0,"userIntroduce":"GpsServiceTesting","userType":4}] 
    这种格式是不需要的。
    [{"userName":"18565877864","userPwd":"000000","userMobilePhone":"15914005524","userAddr":"China","userParentID":3,"userAuthor":1099511562241,"userIntroduce":"GpsServiceTesting","userType":3},{"userName":"zfp1","userPwd":"000000","userMobilePhone":"15914001003","userAddr":"ChinaGuangdongShenZhen","userParentID":3,"userAuthor":0,"userIntroduce":"GpsServiceTesting","userType":3},{"userName":"zfp2","userPwd":"000000","userMobilePhone":"15914001004","userAddr":"ChinaGuangdongShenZhen","userParentID":3,"userAuthor":0,"userIntroduce":"GpsServiceTesting","userType":4}] 
      

  3.   

    如果你不想用root,
    需要extend Ext.data.reader.Json比如
    Ext.define('Ext.data.reader.JsonPWithoutRoot', {
        extend: 'Ext.data.reader.Json',
        read: function(response) {
           ...
        },
        root: '...'
    });
      

  4.   


    我加了root 数据还是不能显示。
      

  5.   

    json里面要配置root,你返回的json数据里面要有相应的root,比如你的reader里面有root:'data',那你的返回json字符串中应该是{data:[{},{}]}之类的
      

  6.   


    已经解决了。
    不是要配置Root的问题!
    我的理解还是这样{data:[{},{}]}这种格式的就要配置root,
    不是这种格式的可以不用配置。
    Ext4.0以上版本好像就是这样的。