Threaded View
-
18 Feb 2012 3:07 PM #1
Answered: getDetailCard works with sencha-touch-all-compat but not with sencha-touch-all-debug
Answered: getDetailCard works with sencha-touch-all-compat but not with sencha-touch-all-debug
I cannot figure out why the following code is working fine, that is it showing the detailCard with sencha-touch-all-compat.js but it does not work with sencha-touch-all-debug.js. I am using sencha-touch-2-b3.
Thank you in advance for your assistance.Code:var petNL = Ext.create('Ext.dataview.NestedList', { iconCls: 'dog_icon', xtype: 'nestedlist', title : 'Available Dogs', store: store, getItemTextTpl: function() { return listfmt; }, 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/>' } } } });
-
Best Answer Posted by Jamie AvinsI'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.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 });


Reply With Quote