Extjs4.1文档example学习之XML Grid Example

这里基本上同http://blog.csdn.net/yunshumingliao/article/details/8536871  array grid的创建方式一样,

不同的主要是   xml 的store加载方式。

var store = Ext.create('Ext.data.Store', {
        model: 'Book',
        autoLoad: true,
        proxy: {
            // load using HTTP
            type: 'ajax',//这里这个是加载本地服务器上的数据。jsonp使用的是别的服务器domino
            url: 'sheldon.xml',
            // the return will be XML, so lets set up a reader
            reader: {
                type: 'xml',
                // records will have an "Item" tag
                record: 'Item',
                idProperty: 'ASIN',
                totalRecords: '@total'
            }
        }
    });
似乎用xml store 也可以。其他的。。。。。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章