1. #1
    Sencha User
    Join Date
    Sep 2011
    Location
    Sallanches, France
    Posts
    371
    Vote Rating
    1
    myput is on a distinguished road

      0  

    Default Build List for Json Data

    Build List for Json Data


    Hello,

    I can get a Json string by my search panel who make a query and send me the good Json string formated.

    I would like to display this result in a list.
    I have two problems:

    First one, how i can give this result to my store ?
    I did that but it's don't work:
    Code:
    else {
    							Ext.Ajax.request ({
    								url: WPApp.config.host + WPApp.config.PhpPath + 'searchModule.php?search=' + query,
    								success: function (e) {
    									var obj = Ext.util.JSON.decode(e.responseText);
    										Ext.getStore(WPApp.stores.ResultPanelListStore).setObj(obj);
    										WPApp.views.ResultPanelList.update(obj);
    										WPApp.views.ResultPanelList.show();
    								}
    							});
    And the list:
    Code:
    Ext.regModel('WPApp.stores.ResultPanelListModel', {
        fields: [
    		{name: 'id', type: 'int'},    
            {name: 'name', type: 'string'},
    		{name: 'idCategory', type: 'string'},
    	]
    });
    
    
    WPApp.stores.ResultPanelListStore = new Ext.data.JsonStore({
        model  : 'WPApp.stores.ResultPanelListModel',
    	setObj: function (id) {
    	    this.itemId = id;
    		WPApp.stores.DirectoryItemListListStore.load({data:this.itemId});
    	}
    });
    
    
    WPApp.views.ResultPanelList = new Ext.List ({
    	fullscreen: true,
    	itemTpl : '{name}',
    	store: WPApp.stores.ResultPanelListStore
    });
    I have only one results, and i sould have 2 results in my list. If i give an alert in the store, i get 2 results that's good but only one is displayed.

    After, another problem, the list is displayed only 1 times on 3 of 4 request.
    I don't know why ...

    Can you help me?

    Thanks

  2. #2
    Sencha User
    Join Date
    Sep 2011
    Location
    Sallanches, France
    Posts
    371
    Vote Rating
    1
    myput is on a distinguished road

      0  

    Default


    i'm sorry, post resolved ....

  3. #3
    Sencha User
    Join Date
    Sep 2011
    Location
    Sallanches, France
    Posts
    371
    Vote Rating
    1
    myput is on a distinguished road

      0  

    Default


    Nop, i have another problem:

    I fact, i have my list, it's good, but i can't get record for the itemtap:
    Code:
    WPApp.stores.ResultPanelListStore = new Ext.data.JsonStore({
        model  : 'WPApp.models.SearchDirectoryListPanelModel',
    	setObj: function (JsonObj) {
    	    this.JsonObj = JsonObj;
    		WPApp.stores.DirectoryItemListListStore.load({data:this.JsonObj});
    	}
    });
    
    
    WPApp.views.ResultPanelList = Ext.extend(Ext.List,{
    	fullscreen: true,
    	itemTpl : '{name}',
    	store: WPApp.stores.ResultPanelListStore,
    	listeners: {
    		itemtap: function(view, index) {
    			var record = WPApp.stores.ResultPanelListStore.getAt(index);
    		}
    	}
    });
    Have you an idea?

  4. #4
    Sencha User
    Join Date
    Sep 2011
    Location
    Sallanches, France
    Posts
    371
    Vote Rating
    1
    myput is on a distinguished road

      0  

    Default


    Var record send me Undefinied variable ... Don't know why because all list i did, i did like that ...

    Have you an idea how to resolve that ?

    Thanks for help

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