日期:2014-05-16  浏览次数:20384 次

Ext中跨域更新数据怎么办???!!!
我在main.jsp中采用ext的viewport布局。代码:

var viewport = Ext.create('Ext.container.Viewport', {
        layout: 'border',
        defaults: {
            collapsible: true,
            bodyStyle: 'padding: 10px'
        },
        items: [logoPanel, treePanel, mainPanel, copyrightPanel]       
    });


通过点击treePanel中的树节点,centerPanel中创建对应的页面。

var treePanel= Ext.create('Ext.tree.Panel', {
        title: ‘功能模块’,
        displayField: 'name',
        region: 'west',
        id: 'moduleList',
        width: '16%',
        autoScroll: true,
        store: treeStore,
        rootVisible: false,
        listeners: {
            itemclick: function(view, record, item, index, e, eOpts) {
                var data = record.raw.extData;
                var global = data.global;
                var entry = data.entry;
                var title = data.name;
                if (entry != null && /^http/.test(entry)) {
                    var html = "<iframe id='ifm' src='" + entry + "'></iframe>";
                    updateMainPanel(html, title);
                }