title: Extjs accordion close all panel dynamically
body: <p>I am using Extjs 5.0.0</p>
  
  <p>I have an accordion with a number of panels. 
  Here my requirement is to expand and collapse panel by clicking on the title.</p>
  
  <p>On the first click it expanded, that's fine. while again clicking on the same title i want to collapse all the panels. Here its opening the very next panel. </p>
  
  <p>I just tried by expanding a hidden panel. But here both hidden panel and the next panel to the clicked panel get expanded.</p>
  
  <pre><code>listeners:{
      afterrender: function(panel){
          panel.header.el.on('click', function() {
            if (panel.collapsed) {
               Ext.getCmp('hiddenpanel').collapse();
            }
            else {
               Ext.getCmp('hiddenpanel').expand();
            }
          });
      }
  }
  </code></pre>
  
  <p>Is there any solution to solve this problem ?</p>
  
  <p>Thanks</p>