I am trying to update a field value from a grid line icon. But I get this error:
Uncaught Ext.data.proxy.Server.buildUrl(): You are using a ServerProxy but have not supplied it with a url.
I am using RestProxy , this is a store definition:
Ext.define('SF.store.Contents', { requires: [ 'SF.Config', 'SF.store.RestProxy' ], extend: 'Ext.data.Store', model: 'SF.model.Content', autoLoad: false, proxy: Ext.create('SF.store.RestProxy', { url: (new SF.Config()).getApiBaseUrl() + "admin/contents" }), });
column code in GridPanel definition
.... store: 'Contents', ..... { xtype: 'actioncolumn', header: 'Action' , width: 40 , items: [{ // Delete button icon: '......./cancel.png' , handler: function(grid, rowIndex, colindex) { var record = grid.getStore().getAt(rowIndex); record.set('status',6); record.save(); //THIS CALL THROWS THE ERROR grid.store.remove(record); } },......
In addition, the proxy works fine for a GET request. Does anyone know what I should determine on the proxy? I read the white paper, but this is not clear to me.
source share