1. #1
    Sencha User andy_ghg's Avatar
    Join Date
    Feb 2009
    Location
    MeiLing Yangzhou JiangSu China
    Posts
    30
    Vote Rating
    0
    andy_ghg is on a distinguished road

      0  

    Default Unanswered: About Ext.data.StreeStore. It can not autowired model in MVC.

    Unanswered: About Ext.data.StreeStore. It can not autowired model in MVC.


    Happy Halloween.


    This is my 'model' code here:
    Code:
    Ext.define('SystemSetup.model.SYSMenu', {
    	extend : 'Ext.data.Model',
    	fields : [{
    		name : 'task',
    		type : 'string'
    	}, {
    		name : 'user',
    		type : 'string'
    	}, {
    		name : 'duration',
    		type : 'string'
    	}, {
    		name : 'done',
    		type : 'boolean'
    	}]
    });
    Then, I create a new 'Store' and use 'SystemSetup.model.SYSMenu':

    Code:
    Ext.define("SystemSetup.store.SYSMenus",{
    	extend : "Ext.data.TreeStore",
    	model : "SystemSetup.model.SYSMenu",
    	proxy : {
    		type : 'ajax',
    		//the store will get the content from the .json file
    		url : 'data/treegrid.json'
    	},
    	folderSort : true
    });
    But when I run this application, Ext JS can not autoload 'SystemSetup.model.SYSMenu' file.


    So I changed 'Ext.data.TreeStore' parent class just like this:
    Code:
    Ext.define('Ext.data.TreeStore', {
        extend: 'Ext.data.Store',
        //..........
    It's running fine. Who can tell me is that a bug? If that is not a bug, could you tell me how can I fix it?


    Could it be that just like that?

    Hope you all give me a reply. Thank you guys~!
    I like ExtJs
    ExtJs is My life~!

  2. #2
    Sencha - Community Support Team
    Join Date
    Jan 2012
    Posts
    1,376
    Answers
    346
    Vote Rating
    113
    vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all vietits is a name known to all

      0  

    Default


    Try to fix your code as below:
    Code:
    Ext.define("SystemSetup.store.SYSMenus",{
        extend : "Ext.data.TreeStore",
        requires: ["SystemSetup.model.SYSMenu"],
        model : "SystemSetup.model.SYSMenu",
        proxy : {
            type : 'ajax',
            //the store will get the content from the .json file
            url : 'data/treegrid.json'
        },
        folderSort : true
    });

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