I have a DataView
that lists a bunch of component.DataItems
. While I have no problem displaying this list of items in a NavigationView, I can't seem to display them inside of an Ext.Menu
Ext.define('AIN.view.MyDataView', {
extend: 'Ext.dataview.DataView',
xtype: 'channellist',
config: {
defaultType: 'mylistitem',
useComponents: true
},
});
This is the menu that I need to display the DataItems
Ext.define('AIN.view.SlideNavigation', {
requires: ['Ext.Menu'],
singleton: true,
constructor: function(config) {
this.initConfig(config);
},
layout : 'fit',
width : 250,
setMenu: function() {
Ext.Viewport.setMenu(this.createMenu('left'), {
side: 'left',
reveal: true
});
Ext.Viewport.setMenu(this.createMenu('right'), {
side: 'right',
reveal: true
});
},
createMenu: function(side) {
var items = [
//Components need to be displayed here (I think)
{
xtype: 'button',
text: 'Latest News',
iconCls: 'star',
scope: this,
handler: function() {
AIN.container.setActiveItem(0);
Ext.Viewport.hideMenu(side);
}
},
];
var className = 'Ext.Menu';
return Ext.create(className, {
items: items
});
}
});
Thank you for reading.