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

后端 未结 3 1311
眼角桃花
眼角桃花 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 01:44

    i faced same problem earlier and it was solved by setting
    autoDestroy: false,
    at config of my navigationView

    its very well working after applying false to this autoDestroy property.
    hope it will work for you too.

    0 讨论(0)
  • 2021-01-20 02:03

    A new version of sencha architect was released which allows adding not listed properties.

    I solved this by adding an action field on my button, and in my controller reacting to that action.

    {
        xtype: 'button',
        id: 'acceptEventButton',
        ui: 'confirm',
        text: 'Accept',
        action: 'acceptEvent'
    }
    

    and in my controller i have the following lines of code

        control: {
            "button[action=acceptEvent]": {
                tap: 'onAcceptButtonTap'
            }
        }
    
    0 讨论(0)
  • 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'
        }
    }
    
    0 讨论(0)
提交回复
热议问题