Results 1 to 3 of 3

Thread: Problem with order of store beforeload event and assigning store to data view

  1. #1
    Sencha User
    Join Date
    Oct 2012
    Location
    Poland
    Posts
    70
    Answers
    4
    Vote Rating
    5
      0  

    Default 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.

    Is there some way to fix it?

  2. You can check if the store is loading (store.isLoading()) in initialize and if it is then mask the list

  3. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,554
    Answers
    3931
    Vote Rating
    1272
      0  

    Default

    You can check if the store is loading (store.isLoading()) in initialize and if it is then mask the list
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it! Checkout the CODE tag!

    Check out my GitHub, lots of nice things for Ext JS and Sencha Touch
    https://github.com/mitchellsimoens

  4. #3
    Sencha User
    Join Date
    Oct 2012
    Location
    Poland
    Posts
    70
    Answers
    4
    Vote Rating
    5
      0  

    Default

    Thanks!

    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.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •