呼び出す時々保存:ExtJSには、我々はExtJSに4.2で、次の店を持って作成する代わりに、更新
Ext.define('Example.store.BasketDocuments', {
extend: 'Ext.data.Store',
model: 'Example.model.Document',
autoLoad: true,
autoSync: true,
sorters: [
{
property: 'doc_type',
direction: 'ASC'
}
],
proxy: {
type: 'rest',
url: baseUrl + 'document_basket',
headers: {
'Accept': 'application/json',
'Content-Type': 'application/json;charset=utf-8'
},
reader: {
type: 'json',
root: 'items'
},
writer: {
type: 'json'
},
actionMethods: {create: "POST", read: "GET", update: "PUT", destroy: "DELETE"}
}
});
それは、ドラッグして、グリッドに接続し、ドロップ機能をされています。
我々はすぐに店を更新してしまうグリッドに(それが動作9用)の周りに10個のファイルをドラッグすると、我々は
/api/document_basket/1964?_dc=1459498608890&{}
のようなURLにPOST機能を実装していないので、我々は、サーバーエラーを取得しますこれは1つのエントリのみです。
他人のためにそれが動作します
/api/document_basket?_dc=1459498608941&{}
だろう。
単一のエントリだけをドラッグすると動作します。
したがって、ExtJSはURLにIDを持つPOSTリクエストを送信していますが、代わりにPUTである必要がありますか?何故ですか?