am using Senchatouch for my mobile application and am want destroy all my components of the application and refresh the application
How to destroy all the components in sencha touch application
1.2k views Asked by chandru At
3
There are 3 answers
0

In order to remove everything from the viewport, you can simply do that like this:
Ext.Viewport.removeAll();
After this, if you have login panel or main panel in your app, then you should add this like below:
Ext.Viewport.add(Ext.create('MyApp.view.Main')); // Here add the home page; either login or main page of your app
I would prefer not to reload the whole app.
You might want to create a base container and fill this with all your items. At the point you want to destroy all components, simply destroy that container
I would prefer to keep that mainContainer available at all time. So
Keeps it easier to add items over time.