In store, there is an event beforeload:
beforeload( Ext.data.Store store, Ext.data.Operation operation, Object eOpts )
by listening to this event, i can add my additional param to operation when i do query action, like this:
store.on('beforeload', function(store, operation) {
operation.params = Ext.applyIf({
myParam1: 'param1',
myParam2: 'param2'
}, operation.params);
});
i also need add my additional params when i do create, update and destroy action. However, the sync event do not pass the operation or store:
beforesync( Object options, Object eOpts )
is there any other way?
Use store.getProxy().setExtraParams({ param: 'value', so:'on' });
hope will work fine :D
Use
store.getProxy().extraParams.paramName1= paramValue1; store.getProxy().extraParams.paramName2= paramValue2;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With