English 中文(简体)
内存Proxy me. 模型为未定义错误
原标题:MemoryProxy me.model is undefined error

I m getting an error like I added below while using static data with memory proxy. Can someone show me my mistake or missing part?

提前感谢。

me.model is undefined
me.setProxy(me.proxy || me.model.getProxy());

我的示范定义:

Ext.define(appName +  .model.Country , {    extend:  Ext.data.Model ,
    fields: [
        {type:  string , name:  abbr },
        {type:  string , name:  name },
        {type:  string , name:  slogan }
    ]
});

这是我的仓库定义:

// The data for all states
var data = {
    states : [
        { abbr : AL , name : Alabama , slogan : The Heart of Dixie },
        { abbr : AK , name : Alaska , slogan : The Land of the Midnight Sun }
    ]
};


Ext.define(appName +  .store.Countries , {
    extend        :  Ext.data.Store ,
    model        : appName +  .model.Country ,
    data        : data,
    proxy: {
        type:  memory ,
        reader: {
            type:  json ,
            root:  states 
        }
    }
});
最佳回答

您可能想要检查该模型文件是否实际上已装入并可供使用。 在处理大量文件时, ExtJS( 我与 4.2.1 一起工作时遇到过这种情况) 有命令问题 。

快速修复在应用定义中使用了 < 坚固 > 要求: : :

Ext.application({
    name:  APP ,
    appFolder:  application ,

    controllers: [
    ...
    ],
    requires: [ APP.model.examples ,  APP.model.other  ...],
    ...
});

如果这有帮助, 我在这里写了更多有关PHP解决方案的文章:

"http://blog.draghici.net/solution-for-extjs-4-me-model-is-unfed-error/" rel="no follow" > ExtJS 4 me. 模型是未定义的错误

问题回答

您是否试图在容器的配置中明确创建并指定存储点?

例如:

var store = Ext.create(appName +  .store.Countries );
Ext.create( Your Component , {
    ...
    store: store,
    ...
});




相关问题
How to change firefox proxy from webdriver?

how can I access Firefox proxy settings from Python Webdriver and change them to make Firefox use modified proxy settings without needing to restart it?

Regex Proxy Server

I control access via a proxy server and run some regex on every request. For prototype I have used curl, regex and php. Obviously this will not put up with any serious load. Can anyone suggest and ...

Specify a Proxy in config vs code for a WSE/SOAP web service

Is there a way to specify a WSE3 proxy in the config file instead of code. I figured out how to get it working in code as follows: valservice.Proxy = new System.Net.WebProxy("http://10.192.xx.xx:...

Accessing a git repository via ssh behind a firewall

I would like to access (clone/push/pull) a private (via ssh) git repository while behind a corporate firewall that only allows http proxy access. I have written a robust Java (daemon) program (based ...

Set proxy data for an app

I have a few .NET apps which use the HttpWebRequest. My gut says i can create a config or manifest file and set the proxy data in there and .NET will automatically load it. But i dont know if that ...

热门标签