json string을 json object로 반드는 케이스
jsonData = Ext.util.JSON.decode("{'total_rows':4,'list':[{'trans_date_pos':'2008-4-4','domain':'test','warehouse':'K','qty':13},{'trans_date_pos':'2008-4-4','domain':'test','warehouse':'K','qty':13},{'trans_date_pos':'2008-4-4','domain':'test','warehouse':'K','qty':13},{'trans_date_pos':'2008-4-4','domain':'test','warehouse':'K','qty':13},{'trans_date_pos':'2008-4-5','domain':'test','warehouse':'K','qty':13},{'trans_date_pos':'2008-4-5','domain':'test','warehouse':'K','qty':13},{'trans_date_pos':'2008-4-5','domain':'test','warehouse':'K','qty':13}]}");
생성된 json object를 store에 저장함
// ext.data.groupingstore는 해당 자료를 grouping하기 위해 store대신 사용함
store = new Ext.data.GroupingStore({
reader: new Ext.data.JsonReader({
totalProperty: 'total_rows',
root: "list",
fields: ["trans_date_pos","domain","warehouse","qty"]
}),
data: jsonData,
groupField:'trans_date_pos',
autoLoad: true
});
댓글 없음:
댓글 쓰기