PDA

View Full Version : How you send the a parameter only once while retriving the json data file?



darkhorni
14 Jun 2012, 3:34 AM
My code:

var store = Ext.create('Ext.data.JsonStore', {
autoDestroy: true,
model: Users,
proxy: {
type: 'ajax',
actionMethods: 'POST',
url: '/application.php?way=users',
extraParams: {meta: 'true'},
reader: {
type: 'json',
root: 'data',
idProperty: 'user_id',
totalProperty: 'total'
}
},

As you can see the extraParams' meta parameter is send every time. How can send it only once?

redraid
14 Jun 2012, 4:03 AM
Use options (http://docs.sencha.com/ext-js/4-1/#!/api/Ext.data.Store-method-load) parameter -


store.load({
params: {
meta: true
}
});

jay@moduscreate.com
14 Jun 2012, 4:24 AM
redraid is absolutely correct.