title: How to update an extjs window on its button click
body: <p>Currently i am facing the following problem.</p>
  
  <p>I am displaying after successful call of this ajax request.</p>
  
  <pre><code>function callDesignWindow(){
  var serviceType = $("#serviceType").val();
  alert(serviceType);
  var ptId = $("#pt_id").val();
  alert(ptId);
  getAjaxPage({
      url : "/ajax/NewEform/design.do?serviceType=" + serviceType +"&amp;ptId =" + ptId,
      successCallback: function (data) {
         showDesignWindow(data);
      }
  });         
  searchVisible = true;
  </code></pre>
  
  <p>}</p>
  
  <p>function showDesignWindow(htmlData){</p>
  
  <pre><code>   alert(" In the show Design Window");
  
     var designWindow =  new Ext.Window({
          title: "E-Form Design Phase",  
          width:650, 
          autoHeight: true,
          id:'designWindow',
          html: htmlData,
          closable: false,
          y: 150,
          listeners: { 
              beforeclose: function () { 
                  searchVisible = false;                      
              } 
          },
          buttons: [
                   { 
                       text: 'Add Control', handler: function() {
                          saveFormControl();
                       }
                   },
                   {
                       text:'Customize', handler: function() {
                          designWindow.hide();                            
                          callCustomWindow();
                       }
                   }
                  ]   
    });
  
     designWindow.show(this);
  </code></pre>
  
  <p>}</p>
  
  <p>function saveFormControl(){</p>
  
  <pre><code>    alert(" add control button clicked");
  
      if (!validateEformData()) return false;
  
      formname= $("#formname").val();
      alert(formname);
      controlType= $("#controlType").val();
      alert(controlType);
      label= $("#labelname").val();
      alert(label);
      dataType= $("#dataType").val();
      required= $("#required").val();
      serviceType= $("#serviceType").val();
      ptId = $("#ptId").val();
      if(controlType == 3){
      var itemList = []; 
      $("#selectedItemLists option").each(function(){
         itemList.push($(this).val()); 
      }); 
      }
  
      data = "eform_name=" + formname + "&amp;control=" + controlType + "&amp;serviceType=" + serviceType +"&amp;ptId=" + ptId +"&amp;labelName=" +label+ "&amp;dataType=" +dataType+"&amp;required="+required+"&amp;items="+itemList;
  
      alert(data);
  
      $.ajax( {
          type : "POST",
          url : "/ajax/eformDetails/save.do",
          data : data,
          cache : false,
          dataType : "text/html",
          timeout: 40000,
          error: function (xhr, err)
          {
              resolveAjaxError(xhr, err);
          },
          success : function(data) {
           // Ext.getCmp('designWindow').close();
               // showDesignWindow(data); 
          }
      });    
  </code></pre>
  
  <p>}</p>
  
  <p>Now on success call of the ajax call ("/ajax/eformDetails/save.do") i want to update the designWindow and reset the values.</p>
  
  <p>please help me in this.</p>