Just did a completely basic standalone project to mimic this behaviour
Code:
Ext.define('App.view.MyPanel', {
extend: 'Ext.Panel',
alias: 'widget.mypanel',
requires: [
'App.view.MyPanelViewModel',
'Ext.Toolbar',
'Ext.Button',
'Ext.grid.Grid',
'Ext.grid.column.Column',
'Ext.XTemplate'
],
viewModel: {
type: 'mypanel'
},
title: 'My Panel',
defaultListenerScope: true,
items: [
{
xtype: 'toolbar',
docked: 'top',
items: [
{
xtype: 'button',
text: 'MyButton',
listeners: {
tap: 'onButtonTap'
}
}
]
},
{
xtype: 'grid',
height: '40%',
width: '100%',
columns: [
{
xtype: 'gridcolumn',
width: 70,
dataIndex: 'string',
text: 'String'
}
]
},
{
xtype: 'list',
height: '100%',
itemTpl: [
'<div>List Item {string}</div>',
'<div>DB</div>'
]
}
],
onButtonTap: function(button, e, eOpts) {
var frm = button.up('panel');
var list = frm.down('list');
console.log(list);
Ext.Msg.alert('rror', list.xtype);
}
});
The console log and the alert returns grid.