无法在sencha中点击列表项

时间:2013-03-21 10:13:20

标签: list sencha-touch-2 containers tap

我已经在容器中添加了两个按钮,现在点击列表项不起作用。请帮助。

代码

Ext.define('X.SelectCategories', {
extend: 'Ext.Container',
xtype: 'selectcategorypanel',
id: 'SelectCategories',
requires:[

],

initialize:function(){
   this.callParent();

    jsonObject = Ext.create('Tablet').make_webservice_call('get_categories');

    Ext.getCmp('select_category_list').setData(jsonObject.info);
    console.log(jsonObject.info);
    //this.getNavigationBar.hide();

},



config: {
    //title : 'Select Categories',
    //iconCls: 'team',
    //styleHtmlContent: true,
   // scrollable: true,
    layout: {
        type: 'fit'
    },
    items: [

        {
            //fullscreen: true,
            mode: 'MULTI',
            /*
            layout: {
                type: 'fit'
            },
            */
            //title:'Select Categories',
            xtype: 'list',
            itemTpl: '{name}',
            autoLoad: true,
            id:'select_category_list',
            store: {
                fields: ['name','title']

            }

        },

        {
            xtype: 'container',
            //fullscreen: true,
            layout: {
                type: 'vbox'
            },
            flex : 1,
            layout: {
                type : 'hbox',
                align: 'bottom'
            },
            defaults: {
                xtype : 'button',
                flex  : 1,
                margin: 10
            },

            items: [
                {ui: 'round',ui:"confirm" ,text: 'Save',id: 'categorysaveButton'},
                {ui: 'round', ui:"decline" ,text: 'Reset',id: 'categoryresetButton'}
            ]

        }

    ]


}

})

1 个答案:

答案 0 :(得分:1)

尝试扩展Navigationview extend: 'Ext.navigation.View',