1. #1
    Touch Premium Member
    Join Date
    Feb 2009
    Location
    Firenze, Italia
    Posts
    156
    Vote Rating
    0
    stefx is on a distinguished road

      0  

    Default load XMLStore with phonegap

    load XMLStore with phonegap


    Hi to all, I've used this store to load data from XML:

    Code:
    var store = new Ext.data.Store({
        autoLoad: true,
        proxy: {
            type: 'ajax',
            url: 'http://<path>/file.xml',
            reader: {
                type: 'xml',
                record: 'record'
            }
        },
        fields: ['id','nome','descrizione']
    });
    I need to put this code inside phonegap application but I can't use an ajax proxy because I don't know the exact url.

    Wich kind of proxy I can use? Otherwise, I to use loadData method with an XML file?

    Thanks a lot
    Stefano

  2. #2
    Touch Premium Member
    Join Date
    Feb 2009
    Location
    Firenze, Italia
    Posts
    156
    Vote Rating
    0
    stefx is on a distinguished road

      0  

    Default


    Anyone???
    thanks

  3. #3
    Sencha User
    Join Date
    May 2011
    Posts
    3
    Vote Rating
    0
    azfrederick is on a distinguished road

      0  

    Default


    Can you just create the proxy at runtime and pass in the URL?

    Code:
    var urlPath = 'http://mypath.com/file.xml'
    var store = new Ext.data.Store({
    autoLoad: true,
    proxy: {
    type: 'ajax',
    url: urlPath,
    reader: {
    type: 'xml',
    record: 'record'
    }
    },
    fields: ['id','nome','descrizione']
    });
    


Similar Threads

  1. Ext.data.XmlStore won't load
    By samuelsmith in forum Ext 3.x: Help & Discussion
    Replies: 1
    Last Post: 3 Jan 2011, 7:57 AM
  2. why i can't load the xmldocument data to xmlstore object?
    By linuxyf in forum Ext 3.x: Help & Discussion
    Replies: 6
    Last Post: 15 Nov 2010, 1:43 AM
  3. how can i load the xml data to xmlstore ?
    By linuxyf in forum Ext 3.x: Help & Discussion
    Replies: 8
    Last Post: 4 Nov 2010, 12:43 AM
  4. Help required in xmlstore.Error: Ext.data.XmlStore is not a constructor
    By arunsenthild in forum Ext 3.x: Help & Discussion
    Replies: 2
    Last Post: 3 Aug 2010, 6:14 AM
  5. Help load ComboBox from XmlStore
    By denverskills in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 30 Dec 2009, 4:46 PM