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();
}
});