1. #1
    Sencha User
    Join Date
    Oct 2011
    Posts
    25
    Answers
    1
    Vote Rating
    0
    evilight is on a distinguished road

      0  

    Default Answered: How to implement add a tab after the data loading is completely finish.

    Answered: How to implement add a tab after the data loading is completely finish.


    just like this page
    http://dev.sencha.com/deploy/ext-4.0...dex.html#!/api

    when you click one component , for example, "grid"
    it don't show the grid tab first, but load mask rolling.
    right after all data is loaded, tab show.

    I'm trying to show a data grid in a tab, before the data is fully loaded, I hope I can see the loading pitcure just like the api document dose.

    So, first, I create a store, then create a grid panel, then add it to the tab panel.
    but even I set loadMask to true in the grid panel, I still can not see the loading picture.
    it will show an empty tab, and after 2-3 sec, all data show in the grid, without a loading picture.

    I thought maybe it's because when I invoke result_tab_panel.add, the grid is not instantiation yet..

    the part of code I use to add the grid panel into a tab is following:

    Code:
                 var store = Ext.create('KWI.store.queueStatus',{id:'store'+index,});
                  store.load({ params: { mylimit: value} });
                  var grid = Ext.create('KWI.ui.gridpanel',{title: 'Result' + index , store: store});
                  result_tab_panel.add(grid);
                  result_tab_panel.setActiveTab(grid);
                  index++;

  2. In 4.0.7 or before, you had to have the grid created and rendered before the store is loading. In 4.1.0, I fixed this issue.

  3. #2
    Sencha - Senior Forum Manager mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    36,554
    Answers
    3447
    Vote Rating
    814
    mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute mitchellsimoens has a reputation beyond repute

      0  

    Default


    In 4.0.7 or before, you had to have the grid created and rendered before the store is loading. In 4.1.0, I fixed this issue.
    Mitchell Simoens @SenchaMitch
    Sencha Inc, Senior Forum Manager
    ________________
    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  4. #3
    Sencha User
    Join Date
    Oct 2011
    Posts
    25
    Answers
    1
    Vote Rating
    0
    evilight is on a distinguished road

      0  

    Default


    Thank you very much, I'll upgrade to 4.1.0 beta1

Thread Participants: 1