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?
setExtraParam
when the change occur in the UI. Say there is a checkbox somewhere that is causing the change, you may listen to the change event, and set the extraParam there. – Hamlett