when I use insertChild() or Sync(), proxy sends GET to server with just _dc param, what I should do to save my tree via proxy?
EDIT:added writer, now ext doing POST but
Configure a writer inside the proxy. Without the writer proxy does not know what to do.
I have a tree in Ext 5.0 (but it works also in Ext 4.x) with tree model configured this way:
Ext.define('At.model.ContinentModel',{
extend:'Ext.data.TreeModel'
,alias:'model.continentmodel'
,idProperty:'id'
,fields:[
{name:'text', type:'string', persist:true}
,{name:'iconColor', type:'string'}
]
,proxy:{
type:'ajax'
,url:'resources/service.php/tree/read/1/'
,writer:{
type:'json'
,allowSingle:false
,encode:true
,rootProperty:'data'
}
}
});
The tree store is configured with autoSync:true
. Changes in text
field trigger server requests that look like this: