Ext.form.ComboBox 中如何移除事件

解决方案 »

  1.   

    Ext.getCmp("comboxID").un("事件名称", functioname);
      

  2.   

    items    :   [{
          xtype:   'combo',
          width:   100,
          disabled   :  <%=request.getParameter("userType")%>,
          fieldLabel   :   '员工号',
          id : 'userid',
          name    : 'user',
          value   : '<%=user.getUserid()%>',
    triggerClass: 'x-form-search-trigger',
    onTriggerClick: function (){
    basicInfoMain('1','1');//调用的方法
    }
          }]
    我想把onTriggerClick去掉应该怎么做?
      

  3.   

    试试 :var fn=function (){ 
    basicInfoMain('1','1');//调用的方法 
    }onTriggerClick:fn
    Ext.getCmp("userid").un("triggerclick", fn);
      

  4.   

    removeListener( String eventName, Function handler, [Object scope] ) : void
    Removes an event handler.
    Removes an event handler.
    Parameters:
    eventName : String
    The type of event the handler was associated with.
    handler : Function
    The handler to remove. This must be a reference to the function passed into the addListener call.
    scope : Object
    (optional) The scope originally specified for the handler.
    Returns:
    void
    这是移除某个事件的绑定