Code:
Ext.define('my.DogList', {
extend: 'Ext.dataview.NestedList',
xtype: 'doglist',
config: {
iconCls:'dog_icon',
title:'Available Dogs'
},
getDetailCard:function (node) {
if (node) {
return {
xtype:'panel',
scrollable:true,
styleHtmlContent:true,
fullscreen:true,
items:{
docked:'top',
xtype:'toolbar',
title:node.get('name'),
},
html:'<img src="' + node.get('avatar') + '" width="310" height="310" >'
+ 'Age:</strong> ' + node.get('age') + '<br/>'
}
}
}
});
var petNL = Ext.create('my.DogList', {
getItemTextTpl:function () {
return listfmt;
},
store: store
});
I'm not sure what listfmt is since it's defined somewhere else in your closure.. Otherwise I'd put it in the new class as well.