exxt demo

  1. function GetInvoices(record, expander, callback) {   
  2.     Ext.Ajax.request( {   
  3.      url : 'getDetailInvoices.json',   
  4.      params : {   
  5.       'chkNo' : record.data.chkNo,   
  6.       'vendorNo' : record.data.vendNo   
  7.      },   
  8.      success : function(response) {   
  9.       var data = Ext.decode(response.responseText);   
  10.       if (!data.success) {   
  11.        showError(data.message, checkBooks);   
  12.        return true;   
  13.       }   
  14.       // 设置模板中所需要的record数据,并展开该行   
  15.      record.data.checkSignerInvoicess = data.records;   
  16.      record.commit();   
  17.   
  18.      if (callback) {   
  19.       callback(expander);// 一定要回调该函数,否则不能展开   
  20.     }   
  21.    },   
  22.    failure : function() {   
  23.     if (callback) {   
  24.      callback(expander);   
  25.     }   
  26.    }   
  27.     })   
  28.    }   
  29.    ;  

你可能感兴趣的:(demo)