Threaded View

  1. #1
    Sencha User
    Join Date
    Mar 2012
    Posts
    3
    Vote Rating
    0
    robi.ilham is on a distinguished road

      0  

    Default Answered: cannot load data from store

    Answered: cannot load data from store


    i want to store data from a server that i get using jsonp request. but the problem when i tried to load the data using dataview there are no data in the view

    this is the store and model:
    Code:
    Ext.define('Moapp.model.News', {    extend: 'Ext.data.Model',
        
        config: {
            fields: [
                {name: 'id', type: 'auto'},
                {name: 'title', type: 'auto'},
                {name: 'message', type: 'auto'},
                {name: 'large_images', type: 'auto'}
            ]
        }
    });
    streamStore = new Ext.data.Store({
        model: 'Moapp.model.News',
        proxy: {
                type: "localstorage",
                id: "newsStream",
                reader: {
                type: 'json',
                }            
          },
        autoLoad: true
    });
    this is the request:
    Code:
    Ext.data.JsonP.request({            url:'http://lintas.me/chrome/channel_news/fun/',
                callbackKey:'callback',
                success:function (result) {
                    item=result['items'];
                    console.log(item);
                   streamStore.setData(item);
        
                    
                    }
                });
    and this is the view
    Code:
    Ext.define('Moapp.view.ChannelStreamList',{    extend:'Ext.dataview.DataView',
        xtype:'channelstreamlist',
        
        config:{
            flex:1,
            scrollable:true,
            //store:streamStore,
            itemSelector: "div.stream_item",
            tpl: [
                    '<div id="stream2">',
                         '<tpl for=".">',
                            '<div class="stream_item" id="{id}" ><img src="{large_images}" /><div class="stream-title">{title}</div></div>',
                        '</tpl>',
                        '<div class="clear"></div>',
                    '</div>',
                
            ],
        }
    });
    please help.
    thank you

  2. You should use itemTpl in your dataview, not tpl.

Thread Participants: 1

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