title: Dynamically Loading data when performing cascading in comboboxes in extjs
body: <blockquote>
    <p><strong>Possible Duplicate:</strong><br>
    <a href="https://stackoverflow.com/questions/13193361/cascading-combobox-in-extjs">Cascading Combobox in extjs</a>  </p>
  </blockquote>
  
  
  
  <p>Hi I have two comboboxes ,viz..</p>
  
  <p><strong>AcademicClass</strong></p>
  
  <pre><code>{
      xtype : 'combobox',
      emptyText : 'Academic Class',
      displayField : 'name',
      id:'comboacademicclass',
      valueField : 'id',
      store:classstore,
      triggerAction:'all',
      mode:'local',
      listeners : {
          'select' : {
              fn: function(combo1, value) {
                  var comboSubject=Ext.getCmp('combo-subject');
                  var classId=Ext.getCmp('comboacademicclass').getValue();
                  comboSubject.setDisabled(true);
                  comboSubject.setValue('');
                  comboSubject.getStore().removeAll(true);
                  comboSubject.getStore().load({url:'http://localhost:8080/WebService/rest/type/academicSubjectByClass/'+classId+'.json'});
                      // Using this loading data in second combobox by passing first combobox Id.:- 'classId'.
                      comboSubject.setDisabled(false); 
              }
          }
      }   
  }
  </code></pre>
  
  <p><strong>AcademicSubject</strong>:</p>
  
  <pre><code>{
      xtype : 'combobox',
      emptyText : 'Academic Subject',
      id:'combo-subject',
      displayField : 'name',
      valueField : 'id',
      disabled:true,
      store:subjectstore,
      triggerAction:'all',
      mode:'local'
      ,lastQuery:''
  }
  </code></pre>
  
  <p>Its showing output only first time selection but on second time selection its just showing "Loading" and not dispalying output. Please Help.</p>