私はグリッドとRESTストア(プロキシタイプ 'rest')を持っています。ストアデータを変更するときに、サーバーに削除/ put/post要求を送信する必要があります。ここ は、店舗のコードです:私は、任意のレコードレストストアがサーバー上でリクエストを送信しない
clientgrid.store.remove(selection);
を削除すると
this.store = Ext.create('Ext.data.Store', {
model:this.model,
addCondition:function (key, value) {
this.proxy.extraParams[key] = value;
return this;
},
sorters:[
{
property:'NAME',
direction:'ASC'
}
],
proxy:{
storeId:'storemicorid',
type:'rest',
extraParams:{
model:this.model
},
url:document.head.baseURI + 'rest',
/*api:{ //tried this too
read:document.head.baseURI + 'rest',
create:document.head.baseURI + 'rest',
destroy:document.head.baseURI + 'restd',
update:document.head.baseURI + 'rest'
},*/
reader: {
type: 'json',
root: 'data'
},
writer: {
type: 'json',
encode: true,
root: 'data'
},
actionMethods:{
create: "POST",
destroy: "DELETE",
read: "GET",
update: "PUT"
}
}
});
は、サーバーへの要求がありません。グリッドはデータをロードできますが、サーバーは呼び出しません。 、AJAXと残りストアを試みた変更作家、actionMethods、のURLとAPIを試してみました...理由を見つけることができません..ヘルプしてください...
store.sync()を手動で呼び出すとどうなりますか? – Tommi
アイテムを削除した後にsync()を呼び出すと、グリッドの最初のレコードのデータが、プロキシ設定で設定されたアドレスに送信されます。 json形式で。 –