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.

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Posts
    2
    Vote Rating
    0
    m-kay is on a distinguished road

      0  

    Default TreePanel with cross domain data

    TreePanel with cross domain data


    Is it possible to load data for a treepanel from a cross domain source?

    I tried to use a ScriptTagProxy inside my TreeLoader but I can't get it working. Any suggestions?

    Thanks for you help

  2. #2
    Sencha User
    Join Date
    Oct 2012
    Posts
    2
    Vote Rating
    0
    m-kay is on a distinguished road

      0  

    Default JsonStore inside directFn

    JsonStore inside directFn


    I managed to do it with a JsonStore and ScriptTagProxy inside the directFn function. However I don't know if this is a good solution or if the is a better or even simpler way to do it.

    Code:
    new Ext.tree.TreeLoader({
         directFn:function(nodeId, callback ){
            var store = new Ext.data.JsonStore({
                root: 'folders',
                totalProperty:"results",
                idProperty: 'id',
                remoteSort: true,
                autoLoad: false,
    
    
                fields: [
                    'id', 'name', 'text', 'type'
                ],
    
    
                proxy: new Ext.data.ScriptTagProxy({
                    url: 'http://someurl.ch/data/test.php'
                })
            });
            
            store.load({
                callback: function(){
                    var response = [];
                    for(i=0;i<store.data.items.length;i++){
                        response.push(store.data.items[i].data);
                    }
                    
                    console.log(response);
                    
                    callback(response, {status:true});
                },
                params: {folder:nodeId}
            });
        }
    })

  3. #3

Thread Participants: 1

Tags for this Thread