I'm pushing a view from my navigation view (xtype : 'mainPanel') like this. It's an element of tabbar. In the 2nd view a back button is displayed in navigation bar,But it's not working. 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
});
}
}
}
]
},