【发布时间】:2014-02-12 21:18:40
【问题描述】:
我有以下模型,它使用代理通过 AJAX 从 URL 检索 JSON。
Ext.define('RateManagement.model.Currency', {
extend: 'Ext.data.Model',
fields: [
{ name: 'id', type: 'string' },
{ name: 'name', type: 'string' },
{ name: 'code', type: 'string' }
],
proxy: {
type: 'ajax',
url: 'currencies.json'
}
});
如何将其更改为使用静态硬编码值而不是数据库驱动值?
我一直在查看文档http://docs.sencha.com/extjs/4.0.7/#!/api/Ext.data.Model 并且遇到了Raw,但我不确定如何使用它或者它是否是正确的属性。
【问题讨论】:
标签: javascript extjs