button tap not reacting when view gets added a 2nd time

后端 未结 3 1380
眼角桃花
眼角桃花 2021-01-20 01:34

When an item from a list gets selected i execute the following lines of code.

this.details = Ext.create(\'EventManager.view.EventInfoView\');
this.getNavigat         


        
3条回答
  •  我在风中等你
    2021-01-20 02:04

    You should change your query as follows:

    control: {
        "button[id='acceptEventButton']": {
            tap: 'onAcceptButtonTap'
        }
    }
    

    As an extra information: You can also use xtype in these queries.
    For example if you have a navigationview as follows:

    Ext.define('app.view.Pages', {
        extend: 'Ext.NavigationView',
        xtype: 'pages',
        ...
    }
    

    and you push a list to it like this:

    Ext.define('app.view.ItemList', {
        extend: 'Ext.dataview.List',
        xtype: 'itemlist',
        ...
    }
    

    then you can write your query as follows:

    control: {
        "pages itemlist": {
            itemtap: 'onItemTap'
        }
    }
    

提交回复
热议问题