2012-08-23 29 views
0

我想使用store.remove(item)刪除ExtJS4.1中的Storeitem,但我不想向服務器發送刪除請求。在ExtJS4中刪除Storeitem而不向服務器發送刪除請求

在賣場代理API我只有讀地址定義:

api: { read: '/daten/zhalter' }

現在,當我刪除一個JavaScript錯誤被拋出的項目。我發現它是因爲我沒有定義destroy-url,當我定義了一切都很好。

我的問題是:如何刪除一個項目而不發送刪除請求?

回答

2

我自己找到了答案。我轉過身autosync關閉該命令:

 
quellStore.autoSync = false;  
quellStore.remove(item);  
quellStore.autoSync = true; 
0

你應該增加毀壞財產:

API:{毀滅: 'URL /刪除'}

然後使用:

store.sync();