1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    37
    Vote Rating
    0
    amaccann is on a distinguished road

      0  

    Question Unanswered: [PR4] getStore() -> setData() on NestedList throwing Model Error

    Unanswered: [PR4] getStore() -> setData() on NestedList throwing Model Error


    Hey; I am quite frustrated at this point so hoping someone might be able to shed some light on it. I am making a getStore() call on a defined (Tree)Store, with the intention of pushing it into a nestedlist; the syntax of my Store / Model is the same as the rest of the app, and yet when I try and call setData() on the nestedlist, I can get the following error from debug:

    Uncaught Error: [ERROR][Ext.data.Store#setModel] A store needs to have a model defined on either itself or on its proxy

    Anyone got any idea what could be the problem here, as I'm at my wits end

    Store
    Code:
    Ext.define('myApp.store.MyEvents', {
        extend: 'Ext.data.TreeStore',
        requires: 'myApp.model.ListItem',
        config: {
            model: 'myApp.model.ListItem',
            proxy: {
                type: 'ajax',
                extraParams: {},
                url: window.serverPath + '/javascripts/mobile/app/store/test.json',
                reader: {
                        type : 'json',
                        root: 'items'
                }
            }
        },
    });
    Model
    Code:
    Ext.define("myApp.model.ListItem", {
        extend: "Ext.data.Model", 
        fields: [
            { name: 'text', type: 'string' },
            { name: 'date', type: 'string' },
            { name: 'id', type: 'string' }
        ]
    });
    Snippet of Controller & View:
    Code:
    var store = Ext.getStore('MyEvents');
    var mytest = this.getMytest();
    [...]
        store.load({
            callback: function(result){
                app.unmask();
                console.log(store.data.items);
                mytest.setData(store.data.items);
    [...]
    Code:
                {
                    xtype: 'nestedlist',
                    id: 'mytest',
                    getItemTextTpl : function(node) {
                        return template = '<div id="event_{id}_xxxx" class="list-item"><p class="date">{date}</p>{text}</div>';    
                        // Overwrite list item to show custom HTML  
                       },
                },

  2. #2
    Sencha User
    Join Date
    Jan 2012
    Posts
    37
    Vote Rating
    0
    amaccann is on a distinguished road

      0  

    Default


    *Bump*
    Anyone?

    Bit lost here...

  3. #3
    Sencha User
    Join Date
    Aug 2011
    Posts
    13
    Vote Rating
    0
    juniorplenty is on a distinguished road

      0  

    Default Bump

    Bump


    Ditto.

  4. #4
    Sencha User
    Join Date
    Feb 2012
    Posts
    1
    Vote Rating
    0
    tonynero is on a distinguished road

      0  

    Default ME Too

    ME Too


    Ditto

  5. #5
    Sencha User anke1460's Avatar
    Join Date
    Jan 2008
    Location
    武汉
    Posts
    5
    Vote Rating
    0
    anke1460 is on a distinguished road

      0  

    Default


    what version you have used?
    i change my version to "2.0.0.pr3", it's ok.

  6. #6
    Sencha User
    Join Date
    Feb 2012
    Posts
    2
    Vote Rating
    0
    balthasarr is on a distinguished road

      0  

    Default


    I'm using version 2.0.0.beta3 and am still getting this error?

    Anyone find a fix?

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..."