1. #1
    Sencha User
    Join Date
    Jun 2007
    Posts
    29
    Vote Rating
    0
    naxito is on a distinguished road

      0  

    Default Unanswered: Bug TreeStore Ajax XML in IE9?

    Unanswered: Bug TreeStore Ajax XML in IE9?


    Hello,
    I have a problem with an Ajax XML TreeStore, in IE9.

    TreeStore.js line 347 -> data[reader.root] is undefined


    Code:
    delete data[reader.root]


    It is working fine in FF and Chrome.
    it's easy to solve... just adding a check.
    Code:
    if(data[reader.root]) delete data[reader.root]
    But I am not sure if it is a bug , or it is somekind of error in my code.

    Here is my code
    App.js
    Code:
    Ext.application({
        name: 'TreeStoreBug',
        appFolder: 'app',
        controllers: ['Tree'],
        launch: function () {
            Ext.create('Ext.container.Viewport', {
                layout: 'fit',
                items: [{
                    xtype: 'panel',
                    items: [{
                        xtype: 'view_treegrid'
                    }]
                }]
            });
        }
    });
    Controller
    Code:
    Ext.define('TreeStoreBug.controller.Tree', {
        extend: 'Ext.app.Controller',
        views: ['Tree'],
        models:['Node'],
        stores:['Tree'],
        init: function () {
            this.control({
                '#view_treegrid': {
                    render: this.onEditorRender
                }
            })
        },
        onEditorRender: function () { }
    })
    View
    Code:
    Ext.define('TreeStoreBug.view.Tree', {
        extend: 'Ext.tree.Panel',
        id: 'view_treegrid',
        alias: 'widget.view_treegrid',
        store: 'Tree',
        rootVisible: false,
        columns: [{ header: 'Id', dataIndex: 'id', flex: 1, xtype: 'treecolumn' }, { header: 'Text', dataIndex: 'text', flex: 1 }]
    })
    Model
    Code:
    Ext.define('TreeStoreBug.model.Node', {
        extend: 'Ext.data.Model',
        idProperty: 'id',
        fields: [{ name: 'id', mapping: 'id', type: 'string' },
                 { name: 'text', mapping: 'text', type: 'string' }
                ]
    
    });
    Store
    Code:
    Ext.define('TreeStoreBug.store.Tree', {
        extend: 'Ext.data.TreeStore',
        model: 'TreeStoreBug.model.Node',
        autoLoad: true,
        proxy: {
    	type:'ajax',
    	url:'nodes.xml',
            reader: {
                type: 'xml',
                root:'nodes',
                record: '> node'
            }
        },
        root: {
            expanded: true
        },
        listeners: {
            load: function (store, records, indices, opciones) {
            }
        }
    })
    xml
    Code:
    <OpenHR>
    	<nodes>
    		<node>
    			<leaf>0</leaf>
    			<text>0000581141</text>
    			<id>000058114100000000</id>
    			<nodes>
    				<node>
    					<leaf>1</leaf>
    					<text>0581</text>
    					<id>0581</id>
    				</node>
    			</nodes>
    		</node>
    	</nodes>
    </OpenHR>
    And in the following link, it's the test case
    http://nasflora.myds.me/TreeStoreBug/index.html

  2. #2
    Sencha User
    Join Date
    Jun 2007
    Posts
    29
    Vote Rating
    0
    naxito is on a distinguished road

      0  

    Default


    no one knows?

  3. #3
    Sencha Premium Member
    Join Date
    Mar 2012
    Posts
    76
    Answers
    3
    Vote Rating
    0
    stoertebeker is on a distinguished road

      0  

    Default


    Hi,
    honestly I am not quite sure what the issue is. I opened the link in Chrome on Mac and everything seems to work, but I have an app that also has issues on older Vista and XP machines (any browser). Have you tried another proxy type? JSONP?

    ok

Thread Participants: 1

Tags for this Thread