Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

    You found a bug! We've classified it as TOUCH-1351 . We encourage you to continue the discussion and to find an acceptable workaround while we work on a permanent fix.
  1. #1
    Sencha User
    Join Date
    Sep 2011
    Posts
    125
    Vote Rating
    0
    oddz is on a distinguished road

      0  

    Default Tree and/or NestedList Not Functioning With XML Reader

    Tree and/or NestedList Not Functioning With XML Reader


    The tree and/or nested list does not seem to function when using a store with an XML reader.

    Code:
    Ext.Loader.setConfig({ enabled: true });
    
    Ext.define('TreeXmlBug.model.Data',{
        extend: 'Ext.data.Model',
        fields: [
                 {name: 'id', type: 'int'},
                 {name: 'name', type: 'string'}
        ]
    });
    
    Ext.define('TreeXmlBug.store.Data',{
        extend: 'Ext.data.TreeStore',
        model: 'TreeXmlBug.model.Data',
        requires: ['TreeXmlBug.model.Data'],    
        autoLoad: true,
        remoteFilter: false,
        remoteSort: false,
        root: {},
        proxy: {
            type: 'ajax',
            url : 'test_case_tree_xml_bug.xml',
            reader: {
                type: 'xml',
                root: 'categories',
                record: 'category'
            }
        }
    });
    
    Ext.define('TreeXmlBug.view.NestedList',{
        extend: 'Ext.dataview.NestedList',
        xtype: 'mynestedlist',
        
        config: {
            title: 'Test Case: XML Bug',
            store: Ext.create('TreeXmlBug.store.Data'),
            displayField: 'name'
        },
    
        getItemTextTpl: function() {
            return '{' + this.getDisplayField() + '}';
        }
    
    });
    
    Ext.application({
        name: 'TreeXMLBug',
        launch: function() {
            
            Ext.widget('panel',{
                fullscreen: true,
                layout: 'fit',
                items: [{xtype: 'mynestedlist'}]
            });
        
        }
    });
    test_case_tree_xml_bug.xml
    Code:
    <?xml version="1.0"?>
    <categories>
        <category>    
            <id>1</id>
            <name>News</name>
            <categories>
                <category>
                    <id>2</id>
                    <name>Local</name>
                </category>
                <category>
                    <id>6816</id>
                    <name>Latest Updates</name>
                </category>
                <category>
                    <id>8449</id>
                    <name>Crime &amp; Courts</name>
                </category>
                <category>
                    <id>11454</id>
                    <name>We Think Pink</name>
                </category>
                <category>
                    <id>8450</id>
                    <name>Government</name>
                </category>
                <category>
                    <id>107</id>
                    <name>City Ink</name>
                </category>
                <category>
                    <id>8448</id>
                    <name>Schools</name>
                </category>
                <category>
                    <id>8690</id>
                    <name>Health</name>
                </category>
                <category>
                    <id>8814</id>
                    <name>Bizarre</name>
                    <leaf>1</leaf>
                </category>
            </categories>
        </category>
        <category>
            <id>9</id>
            <name>Sports</name>
            <categories>
                <category>
                    <id>53</id>
                    <name>Preps</name>
                </category>
                <category>
                    <id>92</id>
                    <name>College</name>
                </category>
            </categories>
        </category>
    </categories>

  2. #2
    Sencha User
    Join Date
    Sep 2011
    Posts
    125
    Vote Rating
    0
    oddz is on a distinguished road

      0  

    Default


    This is my attempt to begin debugging the issue myself but things are not going so smoothly. As you can see all the categories are being displayed at the root level.

    Code:
    Ext.Loader.setConfig({ enabled: true });
    
    /* -----------------------------------------------------------------------------
    
    My attempt to hack aorund this issue
    
    ------------------------------------------------------------------------------- */
    
    Ext.define('TreeXmlBug.data.reader.XmlOverride',{
        override: 'Ext.data.reader.Xml',
        
        getRoot: function(data) {
        
            // console.log(data);
            
            var nodeName = data.nodeName,
                root     = this.root;
    
            if (!root || (nodeName && nodeName == root)) {
                return data;
            } else {
                return Ext.DomQuery.selectNode(root, data);
            }
        }
        
    });
    
    Ext.define('TreeXmlBug.data.TreeStoreOverride',{
        override: 'Ext.data.TreeStore',
        
        onNodeAdded: function(parent, node) {
        
            if(!parent) {
                return;
            }
        
            var proxy = this.getProxy(),
                reader = proxy.getReader(),
                data = node.raw || node.data,
                dataRoot, children;
        
            Ext.Array.remove(this.removed, node);
        
            if (!node.isLeaf() && !node.isLoaded() ) {
                dataRoot = reader.getRoot(data);
                if (dataRoot) {
                    this.fillNode(node, reader.extractData(dataRoot));
                    delete data[reader.root];
                }
            }
        }
    
        /*onProxyLoad: function(operation) {
            
            console.log(operation.node);
            console.log(operation.getRecords());
            
            this.callParent(arguments);
        }*/
    
    
    });
    
    /* -----------------------------------------------------------------------------
    
    End my attempt to hack aorund this issue
    
    ------------------------------------------------------------------------------- */
    
    Ext.define('TreeXmlBug.model.Data',{
        extend: 'Ext.data.Model',
        fields: [
                 {name: 'id', type: 'int'},
                 {name: 'name', type: 'string'}
        ]
    });
    
    Ext.define('TreeXmlBug.store.Data',{
        extend: 'Ext.data.TreeStore',
        model: 'TreeXmlBug.model.Data',
        requires: ['TreeXmlBug.model.Data'],    
        autoLoad: true,
        remoteFilter: false,
        remoteSort: false,
        root: {},
        proxy: {
            type: 'ajax',
            url : 'test_case_tree_xml_bug.xml',
            reader: {
                type: 'xml',
                root: 'categories',
                record: 'category'
            }
        }
    });
    
    Ext.define('TreeXmlBug.view.NestedList',{
        extend: 'Ext.dataview.NestedList',
        xtype: 'mynestedlist',
        
        config: {
            title: 'Test Case: XML Bug',
            store: Ext.create('TreeXmlBug.store.Data'),
            displayField: 'name'
        },
    
        getItemTextTpl: function() {
            return '{' + this.getDisplayField() + '}';
        }
    
    });
    
    Ext.application({
        name: 'TreeXMLBug',
        launch: function() {
            
            Ext.widget('panel',{
                fullscreen: true,
                layout: 'fit',
                items: [{xtype: 'mynestedlist'}]
            });
        
        }
    });

  3. #3
    Sencha - Sencha Touch Dev Team Jamie Avins's Avatar
    Join Date
    Mar 2007
    Location
    Redwood City, California
    Posts
    3,661
    Vote Rating
    21
    Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough Jamie Avins is a jewel in the rough

      0  

    Default


    Thank you for the report.

    Sencha Inc

    Jamie Avins

    @jamieavins

Thread Participants: 1