I realize this is an old question but wanted to document a little better for others who will find this answer in the future.
Caution when adding a load listener to a store. If using load listeners you have to be sure to include single: true so it will self dispose. If you do not dispose of the listener this becomes a "memory leak" in your program because each time a store is called another listener is going to be added increasing the number of items the load listener will trigger and increasing the amount of memory used.
A cleaner way to handle this is using a callback on the load event
store.getProxy().extraParams = {
WI: Ext.getCmp('transferManagerMain').MenuID,
UID: Ext.getCmp('transferManagerMain').UID,
companykey: obj.$widgetRecord.data.CompanyKey,
transferid: obj.$widgetRecord.data.TransferID
};
store.load({
callback: function (records, operation, success) {
var Tier2PayrollWdw = Ext.create('object');
var responseJson = JSON.parse(operation.getResponse().responseText);
var warnlinArr = responseJson.warnlines;
Ext.fireEvent('setDataViewErrWarnLineArr', warnlinArr);
Tier2PayrollWdw.setWidth(Ext.getBody().getViewSize().width - 300);
Tier2PayrollWdw.setHeight(Ext.getBody().getViewSize().height - 300);
Tier2PayrollWdw.setTitle('Data View - ' +
obj.$widgetRecord.get('OriginalFileName') + ' Transfer Date: ' +
Ext.util.Format.date(obj.$widgetRecord.get('TransferTime'), 'm/d/Y'));
Tier2PayrollWdw.show();
}
});
The callback does not continue to add listeners.