javascript - Extjs Controller 选择监听多种类型组件的事件

标签 javascript css extjs controller extjs4.2

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

执行此操作的最佳方法是什么。我现在拥有的是:

    // 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' 但它爆炸了。

最佳答案

您正在寻找 myform 字段,myform 组合框,在css中代表or like。

关于javascript - Extjs Controller 选择监听多种类型组件的事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22946379/

相关文章:

javascript - 删除 CSS transitionend 事件监听器不起作用

extjs - getStore(); undefined Sencha Touch 2

javascript - 如何使用 javascript 将参数从 JSP 传递到 Servlet

c# - 使用带有 CefSharp 或 CefGlue 的 JavaScript 的本地或流式音频

javascript - 机器人的用户名未定义

css - Highchart 在组列 highcharts 上显示百分比

ios - iOS Safari 和 Chrome 上的 Z-index 问题

extjs - 在 Extjs 中获取对 itemId 的引用

ExtJS Controller 在超链接点击时触发

javascript - Elasticsearch 中的 Cubism 和指标 (statsd/diamond)