itemtap在列表中没有被触发 [英] itemtap is not getting fired in list

查看:113
本文介绍了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 initializefunction of List

这篇关于itemtap在列表中没有被触发的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆