PDA

View Full Version : save method of ArrayStore



freezq
9 Mar 2011, 12:37 AM
i use an ArrayStore in a grid,when i call the store's save method,it pass data to the server
but the param name is 'undefined',i don't want to use request.getParameter('undefined') to get the data,how can i set the param name

thanks!

fay
9 Mar 2011, 1:41 AM
Impossible to guess what's going on without seeing some code.

freezq
9 Mar 2011, 5:25 PM
store_writeBack_config = new Ext.data.ArrayStore({
idIndex:0,
remoteSort: true,
autoSave: false,
autoLoad:false,
writer:writer,
fields: [
'LineNum','WBField', 'TBField','Operation'

],
listeners:
{
loadexception: function(thiss, o, arg, e) {
//console.debug('loadexception!');
},
load: function() {

},
save:function(){
}
},

proxy: new Ext.data.HttpProxy({
api:{
read : 'viewCfgWriteBack',
create:'insertCfgWriteBack',
update:'updateCfgWriteBack',
},

success:function(response,options){
}

})
});

firebug showed the data sent to the server:
undefined {"LineNum":2,"WBField":"ddddd","TBField":"p","Operation":"1","id":2}

i just want to replace the object name 'undefined' to some one i define but i don't know where to define it

Thanks!