I push the view from my navigation view (xtype: 'mainPanel') like this. This is a tab item. In the second view, the back button is displayed in the navigation bar, but it does not work. Any idea?
itemtap: function(list, index, target, record) { list.up('mainPanel').push({ xtype: 'newview', title: 'New', data: record.data }); }
Main.js
Ext.define('Proj.view.Main', { extend: 'Ext.tab.Panel', xtype: 'main', requires: [ 'Ext.TitleBar','Proj.view.phone.Mainpanel','Proj.view.phone.Home','' ], config: { tabBar: { docked: 'bottom', layout: { pack: 'center' } }, items: [ { xtype: 'homePanel' }, { xtype: 'mainpanel' }, ] }
});
Mainpanel.js
Ext.define('Proj.view.phone.MainPanel', { extend: 'Ext.navigation.View', xtype: 'mainpanel', requires : [ '], initialize:function(){ this.getNavigationBar().add(stuff); Ext.getCmp('categoryList').setData(jsonObject.info); }, config: { title : 'Shop', iconCls: 'favorites', styleHtmlContent: true, scrollable: true, items: [ { xtype: 'list', fullscreen: true, itemTpl: '{name}', autoLoad: true, id:'categoryList', store: { fields :['active', 'created','description'] }, listeners: { itemtap: function(list, index, target, record) { list.up('mainpanel').push({ xtype: 'newview', title: 'newview', data: record.data }); } } } ] },