PDA

View Full Version : Ext.data.Store load with namespaced parameters



xperseguers
21 Aug 2009, 2:10 AM
Hi,

I use this to send POST parameters to a datastore while loading data:


ds.load({
params: {
lastName: search_view.findById("lastName").getValue(),
firstName: search_view.findById("firstName").getValue()
}
});The problem is that I'd like to "namespace" my parameters in order to have

"member[lastName]" and "member[firstName]" as POST parameters instead of "lastName" and "firstName".

How may have do this?

xperseguers
21 Aug 2009, 2:38 AM
ds.load({
params: {
lastName: search_view.findById("lastName").getValue(),
firstName: search_view.findById("firstName").getValue()
}
});

Someone suggested something that works: namely quoting keys:



ds.load({
params: {
'member[lastName]' : search_view.findById("lastName").getValue(),
'member[firstName]' : search_view.findById("firstName").getValue()
}
})