Answered: Problem with order of store beforeload event and assigning store to data view
Answered: Problem with order of store beforeload event and assigning store to data view
Hi,
I've got a problem where store "beforeload" event is fired before the store is attached to a List view and thus loading mask is not displayed at all.
In Ext.Application#launch method I'm calling store.load(). My main view (tab.Panel) that is displayed when app is loaded has a List view. Because I'm using the same List view in a few places, but with different data, the store of the List view is assigned in List view "initialize" event handler.
This causes store "beforeload" event to be fired before the store is assigned to the view and thus loading mask is not displayed.
I added this check when "painted" event is triggered and and just call dataview.onBeforeLoad() if it's true. Default dataview.onBeforeLoad handler checks if the view is painted, that's why I listen to "painted" event.