My grid utilises the restful:true parameter
When you click on a grid row – it maps the row values to a form.
The form contains a submit button
At the moment I am utilising the standard AJAX
However what I want to do is utilise the Grids own Rest service that I have already implemented. The below does not actually give me the exact results.
Ext.Ajax.request({
url : '/service/' + Ext.getCmp('id').getValue(),
method : 'PUT',
headers : {
'Content-Type' : 'application/json; charset=utf-8'
},
params : Ext.util.JSON.encode({'data' : gridForm.form.getValues()}),
success : function (result, request)
{
store.reload();
}
});
Remove the encode statement, you don’t have to do so.