Tarang
Tarang

Reputation: 75955

Sencha destroy view, recreate a new one with events

I have a MVC style Sencha Touch App.

When I destroy a view with

view.destroy();

and then try to recreate the view with

view = Ext.create('testapp.view.view1');

All the connections to events in the controller no longer fire. What is the proper way to destroy a view & recreate it so the events will still link up and fire?

Upvotes: 1

Views: 4105

Answers (1)

ThinkFloyd
ThinkFloyd

Reputation: 5021

As Mitchell said - "Try not using the id config and let componentquery resolve a component using xtype and a property."

Check out this discussion: Controller Action painted event not firing after destroy and re-creating panel

Upvotes: 2

Related Questions