---
title: "exxt demo"
author: "liujianeye"
date: "2011-07-12T02:18:24Z"
tags: []
categories: ["Web前端"]
slug: "exxt-demo"
draft: false
lastmod: "2011-08-10T00:42:22Z"
id: 1122102
url: "https://liujianeye.iteye.com/blog/1122102"
---

01. **function** GetInvoices(record, expander, callback) {
02. Ext.Ajax.request( {
03. url : 'getDetailInvoices.json',
04. params : {
05. 'chkNo' : record.data.chkNo,
06. 'vendorNo' : record.data.vendNo
07. },
08. success : **function**(response) {
09. **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. **if** (callback) {
18. callback(expander);// 一定要回调该函数，否则不能展开
19. }
20. },
21. failure : **function**() {
22. **if** (callback) {
23. callback(expander);
24. }
25. }
26. })
27. }
28. ;