Initview.js
Ext.define('App.view.Test1', {
extend: 'Ext.TabPanel',
alias:'widget.MainTb',
id:'MainTb',
config: {
fullscreen: true,
ui:'TabUI',
tabBar:{
docked: 'bottom', // will put the menu on the bottom of the screen
layout:{
pack: 'center' // this will center the menu
}
On click of list item i need to load another list / viewport
function OnMainMenuClick(record)
{
//MainTb.hide();
//MenuItem.show();
Ext.Viewport.remove('App.view.Test1');
Ext.Viewport.add(Ext.create('App.view.MenuItem'));
mode ='MenuItem';
SetItemSubMenuDetails(record.get('MainMenu'));
}
but it do nothing, and on second click gives message [WARN][Ext.Component#constructor] Registering a component with a id (`MenuItem`) which has already been used. Please ensure the existing component has been destroyed (`Ext.Component#destroy()`.