I have a simple tabpanel. I want to fetch currently active tab’s child components and destroy them and doLayout(). The following code won’t work:
Ext.getCmp('centertabpanel').getActiveTab().items.destroy();
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
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.
One thing to keep in mind here is that tabs in TabPanel’s in ExtJS just need to be a BoxComponent in ExtJS 3 or a Component in ExtJS 4. This means that tabs are not required to hold children elements. However, if you know that your
centertabpanelhas tabs with Containers, then you have two options:If your tab is a container that has
autoDestroyset to true (that is the default), then just use:If you want to set
autoDestroyto false, then use the following code:.each()is defined on MixedCollection. It will execute the function in the first parameter against all of the child items, in order. As a side note, if you return false inside the function, then it will stop all iteration of elements.