As I thought I just listened for "activeitemchange" and "show" on initial load. When those fired I get the active item of the tab panel and used the setItems method for the active item. Instead of unloading previous views in hidden tabpanel upon "activeitemchange" I checked to see if navigation view was still on stage. This way the store for the list inside the navigation view did not have to reload.
Code:
Ext.define('MyApp.controller.Viewport',{
extend: 'Ext.app.Controller',
config: {
refs:{
tabpanel:'tabpanel'
},
control: {
tabpanel:{
activeitemchange:'onTabChange',
show:'tabPanelShow'
}
}
},
tabPanelShow:function(tp){
var main = this.getTabpanel().getActiveItem();
main.setItems([{
xtype:'navigationview'
}]);
},
onTabChange:function(a,b,c){
var main = b,
prevmain = c;
if(main.innerItems.length === 0){
main.setItems([{
xtype:'navigationview'
}]);
}
}
});