Uncaught TypeError: Object [object Object] has no method 'getItemId'
I get this error when trying to add an item to a main view class.
here is some code in the main index file (for some reason the developer is loading in the classes manual here istead of dynamic- dont really want to change that at this stage)
Code:
<script type="text/javascript" src="src/view/markets/Olist.js"></script>
<script type="text/javascript" src="src/view/Market.js"></script>
src/../Olist.js (I have cut this down to get rid of errors but i want a custom html item here which will be a row of a list)
Code:
Ext.define('Ap.view.markets.Olist', { extend: 'Ext.data.Model',
xtype:'olist',
fields: ['firstName', 'lastName'],
config: {
id: 'CustomList'
}
});
and here is the class calling that with the item way of doing it
Code:
Ext.define('Ap.view.Market', { extend: "Ext.Panel",
xtype: 'marketPanel',
requires:['Ap.view.markets.Olist'],
config: {
title: _s('market'),
iconCls: 'market',
items: [
{
xtype: 'titlebar',
docked: 'top',
title: _s('market'),
},
{//vbox to stack the tables and labels
layout:'vbox',
centered:'true',
items:[
{
xtype: 'segmentedbutton',
allowMultiple: false,
items: [
{
text: 'aaa'
},
{
text: 'bbb',
pressed: true
}
]
}
,
{
xtype: 'label',
html: 'Lisbon',
height: 69
}
,
{
xtype:'olist'
}
]
}
]
}
});
I appreciate any help on this as it is a bit ambiguous. THANKS