Extjs控制器选择在多种类型的组件上侦听事件

时间:2014-04-08 19:24:06

标签: javascript css extjs controller extjs4.2

我在ExtJS 4.2.2中有一个表单控制器,我想在任何类型的表单字段或组合框甚至表单上的网格上监听更改事件。

这样做的最佳方法是什么。我现在拥有的是:

    // Form event subscriptions
    this.control({

        'myform field' : {
            change : function(field, newValue, oldValue, eOpts) {
                // do work here
        },
        'myform combobox' : {
            change : function(field, newValue, oldValue, eOpts) {
                // do work here
            }
        }
    });

我尝试过'myform field|combo',但它爆炸了。

1 个答案:

答案 0 :(得分:1)

您正在寻找myform field, myform combobox,在css中代表或喜欢。

相关问题