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 也可以。其他的。。。。。

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