モデルにプロキシが定義されています。
モデルで定義されたものを使用したいので、モデルを指すストアを定義しましたが、プロキシはありません。
store.autoLoad
: true は機能していません
コントローラーから明示的に呼び出す必要があります
var store = this.getMyStore();
store.load();
これは予想される動作ですか?
- これはオートロードの目的ではありませんか?
- ストアでプロキシが定義されている場合にのみ機能しますか?
コード:
モデル/MyThing.js
Ext.define('MyApp.model.MyThing', {
extend: 'Ext.data.Model',
fields: ['id', 'reference'],
proxy:
{
type: 'ajax',
url: 'MyThings'
}
});
store/MyThings.js
Ext.define('MyApp.store.MyThings', {
extend: 'Ext.data.Store',
autoLoad: true,
autoSync: false,
model: 'MyApp.model.MyThing'
});