title: Extjs: How to fire event on tree icon
body: <p>My tree is loading very slow due to onclick of each node there is creation of tabpanel in the centerpanel.Now, i want to change the code like on node/icon click load only child nodes. on double click of node load the tab panel. i.e i want to load my tree first.</p>
  
  <pre><code>treePanel.on('expand',function(node){
      alert("Expand event")
      var iconClass=node.getUI().getIconEl().className;
      node.getUI().getIconEl().className="x-tree-node-icon loading_icon";
      var ajaxReq = ajaxRequest(node.attributes.url,0,"GET",true);
  
      ajaxReq.request({
          success: function(xhr) {
              var response=Ext.util.JSON.decode(xhr.responseText);
              appendChildNodes(response.nodes,node); //method to add child nodes
              node.expand();
              node.getUI().getIconEl().className=iconClass;
  
          },
          failure: function(xhr){
              Ext.MessageBox.alert( _("Failure") , xhr.statusText);
              node.getUI().getIconEl().className=iconClass;
          }
      });
  
  });
  rootNode.firstChild.fireEvent('expand',rootNode.firstChild);
  </code></pre>