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

  • Home
  • SEARCH
  • 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 6835285
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:12:51+00:00 2026-05-26T23:12:51+00:00

I am using Extjs 3.3.1 I have a pretty complex page, and I cannot

  • 0

I am using Extjs 3.3.1

I have a pretty complex page, and I cannot change the order of initialization of the objects.

In one of my init functions, I need a grid/store/combobox but the corresponding ComponentMgr/StoreMgr returns null for a certain ID, and I know that it will be available after all of the onReady scripts executes. So is there a way of postponing the execution of the functions, until those components are ready, or adding it as an event and getting it triggered when those components are ready. I tried adding that function to the onReady event, but I guess it executes itself right-away, because it is already in ready-state.

  • 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-05-26T23:12:52+00:00Added an answer on May 26, 2026 at 11:12 pm

    I see two options out of the box:

    • put a function that will call the init function in the last ready callback
    • you can create a timer to check when the objects are ready.

    Example code for the second option:

    function myInitFunction() {
        // some code that doesn't need the component... if any
    
        executeWhenReady('componentId', executeCodeWhichNeedsComponent);
    
        function executeCodeWhichNeedsComponent(component) {
            // this is just the code where you actually need the component
            // an example:
            component.addChild(new ChildComponent);
            component.show();
            // etc...
        }
    }
    
    function executeWhenReady(cmp, fn) {
        if (! Ext.get(cmp)) {
            setTimeout(function() { executeWhenReady(cmp, fn); }, 20);
        } else {
            fn(Ext.get(cmp));
        }
    }
    

    I’d just like to add that inside executeCodeWithComponent you won’t have the same this. If you want to preserve it let me know and I’ll update the code.

    I know both solutions are not that clean, but the best option would be to refactor your code and you said you can’t do that.

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

Sidebar

Related Questions

I'm using ExtJS on a registration page which should have no effect on this.
I have a collection of extjs objects on a webpage, developing using Firefox so
I have a php page how can i show another window using extjs? So
I'm using ExtJS 2.2.1 In my web app, I used to have a TreePanel
I am using the ExtJS framework and I have the following handler that is
I'm using ExtJS 3.2 and have content inside of a tab panel, and the
I'm using extjs and just trying to solve a simple problem: I have a
I'm using ExtJS 3. I have a formPanel with many cloned fields and I
I am using extjs grid, and I have a jQuery timer, which will call
I'm using ExtJS and think it's an amazing framework. However, they don't have a

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.