PDA

View Full Version : Prevent navigationView.pop() to destroy current view instance



azche
5 Dec 2012, 3:03 PM
Hi, is there a way to prevent the current view be destroyed on navigation.pop() ?

(actually it is happening on backButton tap)



//create a a list
var newList = Ext.create('MyApp.view.Module.List', {
id: 'listId',

.....
});

//get the list
var list =Ext.getCmp('listId');

//asume nav is a navigation.view
nav.push(list);
nav.pop();

Ext.getCmp('listId'); --> now it is undefined

I would like to keep that specific instance alive,
thanks

mitchellsimoens
7 Dec 2012, 7:00 AM
Set the autoDestroy config on the items to false.

azche
7 Dec 2012, 7:04 AM
Yep, sorry I miss that in the docs.
Thank you.