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

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..." hd porno faketaxi