Search code examples
extjsextjs4

adding events for a component that is not rendered Extjs 4?


I have a form and a tabpanel The user is supposed to enter some information in the form and click a submit button at the end. I have a controller that controls that button click event and fires various application level events depending upon the input. I catch those events in controllers for all the tabs and do individual processing. What happens is that as not all the tabs are rendered in the beginning and therefore, only the first tab displays the output and others give error. I would like to know if there is a way that i can catch the event in a way that it first waits for the components to get rendered and then does the processing.

Thanks.


Solution

  • Please have a look at deferredRender : Boolean config for tabpanel.

    True by default to defer the rendering of child items to the browsers DOM until a tab is activated. False will render all contained items as soon as the layout is rendered. If there is a significant amount of content or a lot of heavy controls being rendered into panels that are not displayed by default, setting this to true might improve performance.