1. #1
    Ext JS Premium Member
    Join Date
    Apr 2009
    Posts
    89
    Vote Rating
    1
    sanjay_1985 is on a distinguished road

      0  

    Default Unanswered: Read XML data issue

    Unanswered: Read XML data issue


    Hi All,
    I am not able to read the below XML file. Store is not getting loaded. Could you please tell me what am I missing here?

    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    
    
    <access>
    <MENUS menu.name="XXX">
    <Permission name="XXXUpdate">
    <component name="Save">savebuttonid</component>
    <component name="add">addbuttonid</component>
    <component name="accesscode">accesscode button id</component>
    </Permission>
    
    
    <Permission name="XXXRestore">
    <name>XXXRestore</name>
    <component name="restore">restorebuttonid</component>
    </Permission>
    
    
    <Permission name="XXXExpire">
    <component name="expire">expirebuttonid</component>
    </Permission>
    </MENUS>
    
    
    </access>

    Code:
            
            Ext.define('User', {
                extend: 'Ext.data.Model',
                proxy: {
                    type: 'ajax',
                    reader: 'xml'
                },
                fields:[
                        { name: 'MENUS', type: 'string', mapping:'@menu.name'},  
                         { name: 'Permission', type: 'string', mapping:'Permission'} ,
                         { name: 'component', type: 'string', mapping:'component'} 
                       
                       
                        ] 
            });
            var store = new Ext.data.Store({
                model: 'User',
                autoLoad:true,
                proxy: {
                    type: 'ajax',
                    url: 'Test.xml',
                    reader: {
                        type: 'xml',
                        root:'access',
                        record: 'MENUS'
                    },listeners:{                    
                        load:function(store, records, successful, eOpts)
                           {  
                            alert("store loaded");
                           
                                }
                       }
                }
            });
    -->

  2. #2
    Sencha User palakurthivishal's Avatar
    Join Date
    Jul 2013
    Location
    India
    Posts
    74
    Answers
    8
    Vote Rating
    5
    palakurthivishal can only hope to improve

      0  

    Default


    Hello sanjay_1985,
    Use an XmlStore to make things easier.
    http://docs.sencha.com/extjs/4.2.1/#....data.XmlStore
    -->

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar