PDA

View Full Version : Passing extraParam to TreeStore and ExtDirect (Ext4.1.1)



ssamuel68
11 Jul 2013, 8:08 AM
Hi,

Its possible to pass and extra param on a tree store.

I've been trying different ways but not succeed.

Here is my code:


Ext.define('Test.store.Tree', {
extend: 'Ext.data.TreeStore',
model: 'Test.model.Tree',
autoLoad: false,
proxy: {
type: 'direct',
directFn: Test.getTree,
paramOrder: ['node'],
extraParams: {
foo: 'bar'
},
},
listeners: {
beforeload: function(store) {
store.proxy.extraParams.foo = 'bar';
}
}
});


But on my controller I can't get that foo param the only thing that I recieve is the id of the tree.

Any suggestion?

slemmon
16 Jul 2013, 10:55 AM
What if you include 'foo' in the paramOrder array?