JorgeeFG
JorgeeFG

Reputation: 5961

ExtJs 4.0.7, how to use eOpts in events?

I am writing this:

var idOptionsModel = getOptionsModel(opciones, fldId);
var idOptionsStore = getStore(idOptionsModel, idOptionsModel);
var dependsOn = record.get('dependeDe');
var hasDependency = (typeof dependsOn == 'string');
if( hasDependency ) {
  idOptionsStore.on('beforeload', function( store, operation, eOpts ) {

  });
}

Well in this point I have a doubt on how to pass parameters to eOpts, if the event is fired automatically.

What I need to do is override the proxy.url property in order to add a parameter in the url, which is the father combobox (Selecting Country->State->City).

Thanks!!

Upvotes: 1

Views: 1426

Answers (1)

Benjamin E.
Benjamin E.

Reputation: 5162

As far as I understand your question, the eOpts object has nothing to do with that. eOpts is the config object of the listener.

What you need to do is get the proxy - either from store or model .getProxy() - then change the url on the proxy before loading the store. The docs have all that info.

Upvotes: 2

Related Questions