kpopov
10 Sep 2009, 11:36 AM
I am having trouble using the params config option, or any other option for that matter, to pass parameters to the server side while using the Ext.data.DirectProxy class.
Here is what I am trying to do. I would like to have a grouped EditorGridPanel, and I declared the following variable:
var detailsGrid = new Ext.grid.EditorGridPanel({
ds: new Ext.data.GroupingStore({
reader: myCustomReader ,
proxy : new Ext.data.DirectProxy({
directFn: Ext.ss[myFunction].getDetails,
params:[{
uid: THE_PARAM_THAT_NEEDS_TO_BE_SENT}],
paramsAsHash: true ,
paramOrder: ['uid']
}),
autoLoad: true,
sortInfo: {field: 'sortField', direction: 'ASC'},
groupField: 'groupField'
}),
columns: []
});Everything works fine now, except that I have had to hard code the uid parameter in myFunction. When I debug the doRequest function of DirectProxy, I can see a params object but it seems to be empty.
Do you guys see what am I doing wrong? Where can I place the params or baseParams option in order to pass an argument to myFunction?
Any help would be appreciated!
Thanks.
Here is what I am trying to do. I would like to have a grouped EditorGridPanel, and I declared the following variable:
var detailsGrid = new Ext.grid.EditorGridPanel({
ds: new Ext.data.GroupingStore({
reader: myCustomReader ,
proxy : new Ext.data.DirectProxy({
directFn: Ext.ss[myFunction].getDetails,
params:[{
uid: THE_PARAM_THAT_NEEDS_TO_BE_SENT}],
paramsAsHash: true ,
paramOrder: ['uid']
}),
autoLoad: true,
sortInfo: {field: 'sortField', direction: 'ASC'},
groupField: 'groupField'
}),
columns: []
});Everything works fine now, except that I have had to hard code the uid parameter in myFunction. When I debug the doRequest function of DirectProxy, I can see a params object but it seems to be empty.
Do you guys see what am I doing wrong? Where can I place the params or baseParams option in order to pass an argument to myFunction?
Any help would be appreciated!
Thanks.