ExtJs 4.2: 'id' of Controller

一笑奈何 提交于 2019-12-11 12:58:21

问题


I have set the 'id' config of controller like

Ext.define('App.controller.popUpController', {
    extend: 'Ext.app.Controller',

    /**
     * @cfg {String} view
     * View for which popUpController will act as a controller
     */
    view: [
        'PopUpWindow'
    ],

    id:'testController'
})

But when I am trying to retrieve id of controller to pass it to

Ext.app.EventBus.unlisten(App.app.getController('popUpController').id)

It is returning name of controller: 'popUpController' not the id: 'testController'. Although I am achieving my goal to unlisten all event handlers related to my controller but my question is why the 'id' property is returning me name and not the given id of the controller?

来源:https://stackoverflow.com/questions/36470403/extjs-4-2-id-of-controller

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!