PDA

View Full Version : Update URL is firing Create URL - extjs3



kumar_Rajesh78
6 Nov 2013, 2:24 PM
I have the following configuration.
When I am changing a column on the screen from 0 to 1, it fires the URL defined under create.
I am so puzzled as to why this is happening.


DurationOutResultsStore = Ext.extend(Ext.data.JsonStore, {
constructor: function() {
DurationOutResultsStore.superclass.constructor.call(this, {
id: 'durationStore',
autoLoad: true,
autoSync: true,
root: 'durationContainers',
proxy: durationProxy,
reader: {
type: 'json',
successProperty: 'success',
root: 'durationContainers',
messageProperty: 'message'
},
writer: {
encode: true,
writeAllFields: true,
root: 'durationContainers'
},



var durationProxy = new Ext.data.HttpProxy({
api: {
read:'/wam-coldfusion/rest/api/simulator/report/durationOut',
create: '/wam-coldfusion/rest/api/simulator/report/updateDuration'
},
headers: { 'Content-Type': 'application/json', 'Content-Length': '5000'},
method: 'GET'
});

slemmon
11 Nov 2013, 3:19 PM
You might have to dig into the source to see what happens when you have an api config on the proxy and have only the read and create actions configured and then an update is performed.

Normally you'll set either the url config or each of the api config's options: read, create, update, and destroy