使用Ext的Grid,Form,Dialog來實(shí)現(xiàn)分頁列表,創(chuàng)建,修改,刪除的例子
Posted on 2007-09-12 14:15 puras 閱讀(3380) 評(píng)論(4) 編輯 收藏 所屬分類: ExtJS作者:赫連紫軒(Puras)
為了測(cè)試一些功能寫的
代碼有些亂
對(duì)付看下吧
呵
用于列表顯示的結(jié)果的JSON數(shù)據(jù)結(jié)構(gòu)樣例:
{
"totalCount":58,
"roleList":[
{
"id":1,
"description":"description1",
"name":"puras1",
"createDate":"Wed Sep 12 11:28:46 CST 2007",
"updateDate":"Wed Sep 12 11:28:46 CST 2007"
},
{
"id":2,
"description":"description2",
"name":"puras2",
"createDate":"Wed Sep 12 11:28:46 CST 2007",
"updateDate":"Wed Sep 12 11:28:46 CST 2007"
},
{
"id":3,
"description":"description3",
"name":"puras3",
"createDate":"Wed Sep 12 11:28:46 CST 2007",
"updateDate":"Wed Sep 12 11:28:46 CST 2007"
},
{
"id":4,
"description":"description4",
"name":"puras4",
"createDate":"Wed Sep 12 11:28:46 CST 2007",
"updateDate":"Wed Sep 12 11:28:46 CST 2007"
},
{
"id":5,
"description":"description5",
"name":"puras5",
"createDate":"Wed Sep 12 11:28:46 CST 2007",
"updateDate":"Wed Sep 12 11:28:46 CST 2007"
}
]
}
添加,修改,刪除后返回的JSON數(shù)據(jù)結(jié)構(gòu)樣例: "totalCount":58,
"roleList":[
{
"id":1,
"description":"description1",
"name":"puras1",
"createDate":"Wed Sep 12 11:28:46 CST 2007",
"updateDate":"Wed Sep 12 11:28:46 CST 2007"
},
{
"id":2,
"description":"description2",
"name":"puras2",
"createDate":"Wed Sep 12 11:28:46 CST 2007",
"updateDate":"Wed Sep 12 11:28:46 CST 2007"
},
{
"id":3,
"description":"description3",
"name":"puras3",
"createDate":"Wed Sep 12 11:28:46 CST 2007",
"updateDate":"Wed Sep 12 11:28:46 CST 2007"
},
{
"id":4,
"description":"description4",
"name":"puras4",
"createDate":"Wed Sep 12 11:28:46 CST 2007",
"updateDate":"Wed Sep 12 11:28:46 CST 2007"
},
{
"id":5,
"description":"description5",
"name":"puras5",
"createDate":"Wed Sep 12 11:28:46 CST 2007",
"updateDate":"Wed Sep 12 11:28:46 CST 2007"
}
]
}
json = "{success : true, info : '添加成功'}"
json = "{failure : true, info : '添加失敗'}"
json = "{failure : true, info : '添加失敗'}"
下載地址:Grid.Rar