Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7864773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T23:53:09+00:00 2026-06-02T23:53:09+00:00

i have a sencha touch application that uses a tabpanel, a beta version of

  • 0

i have a sencha touch application that uses a tabpanel, a beta version of this application loads all items of the tabpanel and displays it.
with so many items, switching between tabs became slower
for optimization my idea is to load items only when a certain panel is activated after showing a loading mask.

i was able to make it work on first click but when i switch to the same tab another time it’s not being filled or at least items are not being showed.
no exceptions are thrown.

Ext.application({
    name : 'Sencha',
    launch : function() {
           var root = contents;
           var children = root._listOfContentChild;
           var mainPanel =  Ext.create('components.NavigationPanel',
                {
                iconCls : 'more', 
                listeners: {

                   activate: function() {   
                             mainPanel .setMasked({ 
                                xtype: 'loadmask',
                                message: 'Loading...'
                            });

                           setTimeout(function() {          
                              loadItems(root,children);  // returns my items
                              mainPanel .setItems(items);
                              mainPanel .setMasked(false);
                            }, 300);

    } } });

   var settingsPanel =  Ext.create('components.NavigationPanel', {
        title : 'Settings',
        iconCls : 'settings',
    });


  view=Ext.Viewport.add({
        xtype : 'tabpanel',  
        deferredRender:true,

        tabBarPosition : 'bottom',
        activeItem:settingsPanel,
        items : [mainPanel,settingsPanel ]
    }); 
    }
    });

overview:
my application is working correctly if all items are filled at the beginning before pressing on tabs
my problem is when i have a huge number of items and i press on their corresponding tab. it hangs for 1,2 secs.
a person using this application will think that he didn’t press correctly on the tab and it will look so slow.
my approach is to load a mask on tab press just for 1 sec, this will make my tab respond automatically when pressed, then i add my items. this idea worked only for the first click, when i switch to another tab and back to the original nothing is being showed (except for the loading mask)
i tried mainPanel.add instead of mainPanel.setItems. i faced another problem, now in the next tap on the panel,my items are shown but without the loading mask as if i’m loading the items at the beginning before pressing.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T23:53:10+00:00Added an answer on June 2, 2026 at 11:53 pm

    I figured out the solution. Check the below code.

    Hope that helps you!

    Code :

    Ext.Loader.setConfig({
        enabled: true
    });
    
    Ext.application({
        name: 'Sencha',
    
        launch: function() {
            //var root = contents;
            //var children = root._listOfContentChild;
            var mainPanel =  Ext.create('Ext.Panel', {
                                iconCls : 'more', 
                                id:'mpanel',
                                styleHtmlContent:true,
                                listeners: {
                                   painted: function() {  
                                     mainPanel.removeAll();
                                     mainPanel.add({
                                           masked:{
                                             xtype:'loadmask',
                                             id:'lmask',
                                           }
                                     });
                                     setTimeout(function() {    
                                           Ext.getCmp('lmask').hide();
                                           Ext.getCmp('mpanel').add({ xtype:'textfield',label:'Name',required:true });
                                       }, 300);
    
                                     }
                                } 
                              });
    
            var settingsPanel =  Ext.create('Ext.Panel', {
                title : 'Settings',
                iconCls : 'settings',
            });
    
    
            view=Ext.Viewport.add({
                xtype : 'tabpanel',  
                deferredRender:true,
    
                tabBarPosition : 'bottom',
                activeItem:settingsPanel,
                items : [mainPanel,settingsPanel ]
            }); 
        }
    });
    

    Sample output :

    Loading Mask

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using sencha touch beta 3 version at the moment. I have a
I have a Sencha Touch 1.1/Phonegap 1.3 application that works correctly on the iPad
I have a sencha touch application that I built using sencha touch 2.0. I
I have an application in Sencha Touch where I have a textareafield. In Chrome,
I have come to see that Sencha Touch framework is improving noticeably. Since I
I'm new to Sencha Touch (and MVC mostly for that matter), we have a
I am developing Sencha touch application that will work on iPhone. Now application is
I'm creating a Sencha Touch application. I would like to have a banner docked
I would like to do unit testing on my Sencha Touch application, I have
Team I'm creating an iphone application using Sencha Touch. I have registration form ,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.