我嘗試使用直接儲存在ExtJS的
繼承人的代碼,我的店鋪將數據加載到模型由ID-ExtJS的
Ext.define('IDE.store.Files', {
extend: 'Ext.data.Store',
proxy: {
type: 'direct',
api: {
create:Files.AddNew,
read:Files.GetFile,
update:Files.Update,
destroy:Files.Delete,
//load:Files.GetFile
},
paramOrder:'Path'
},
model:'IDE.model.File'
})
爲模型的代碼是
Ext.define('IDE.model.File', {
extend: 'Ext.data.Model',
fields: [
{ name: 'Path', type: 'string' },
{ name: 'Name', type: 'string' },
{ name: 'Extention', type: 'string' },
{ name: 'Content', type: 'string' }
],
idProperty:'Path',
store:'IDE.store.Files'
})
,你可以看到idProperty
是Path
以下代碼段給出錯誤
//this.getStore('IDE.store.Files').load(path, { sucess: function (file) {
// console.log(file.get('Content'));
// } });
this.getStore('IDE.store.Files').load(path);
這裏即時得到來自什麼地方,並試圖path
從特定路徑加載一個文件 誤差
Ext.data.proxy.Direct.doRequest(): No direct function specified for this proxy
現在的問題是ExtJS的的不是足夠的單據和無處不在我搜索我只能看到在proxy
的api
對象中的4 api。 哪些
1.創建
2.read
3.update
4.destroy
我失去了其API? OR
我在哪裏需要給一個直接的功能load()
究竟是否使用的是ExtJS的版本?因爲你給load()的參數看起來不正確。另外,可以從api中刪除load:config: - 不支持。 – Izhaki
ooops那是因爲我在嘗試一些東西..現在我編輯了這個問題來反映確切的情況 –
EXT上的哪個版本? 4.0.7? 4.1? – Izhaki