itemtap在列表中没有被触发 [英] itemtap is not getting fired in list
本文介绍了itemtap在列表中没有被触发的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我已经使用 itemTpl $在
中将 json
数据加载到列表
c $ c>,所有内容从现在开始正常显示,但不知何故 itemtap
事件的列表未被触发。
i不知道是什么原因,以下是我的代码,可以在中查看
而没有任何事情发生。监听器
config
i have loaded json
data into list
in sencha touch using itemTpl
, everything is getting displayed properly as of now but somehow itemtap
event of the list is not getting fired.
i don't know what is the reason, following is my code where one can see the listeners
inside config
and nothing happens there.
Ext.define('demo.view.ProfileList',{
extend:'Ext.dataview.List',
xtype:'profilelist',
requires:[
'demo.store.ProfileStore',
'Ext.plugin.ListPaging'
],
config:{
plugins: [{
xclass: 'Ext.plugin.ListPaging',
autoPaging: true
}],
store:'ProfileStore',
itemTpl: [
'<div class="demo-inner-list-item">',
'<table border="0" >',
'<tr>',
'<td rowspan="5">',
'<div class="demo-img-frame">',
'</div>',
'</td>',
'<td class="demo-list-text">{member_name}</td>',
'</tr>',
'<tr>',
'<td class="demo-list-sub-text">{member_status}</td>',
'</tr>',
'<tr>',
'<td class="demo-list-sub-text">{member_dob:date("F j , Y")}</td>',
'</tr>',
'<tr>',
'<td class="demo-list-sub-text">{member_designation} - {member_work_loc}</td>',
'</tr>',
'</table>',
'</div>'
],
listeners: {
itemtap: function (list, index, item, evt) {
console.log("TAP");
}
}
},
initialize: function() {
Ext.getStore('ProfileStore').load();
}
});
推荐答案
我发现问题我还没有叫code> this.callParent()在我的初始化
函数列表
i found the problem i haven't called this.callParent()
in my initialize
function of List
这篇关于itemtap在列表中没有被触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文