Sedang mengkaji beberapa pilihan yang ada untuk integrasi Json dan Spring 3.05
error, issue, RnD, notes for my colleagues ... anything related with my job. A good programmer should be a good and fast reader. This log just to cut the costs of my RnD. Nothing personal :)
Showing posts with label JSON. Show all posts
Showing posts with label JSON. Show all posts
Tuesday, 11 September 2012
Monday, 16 July 2012
DOJO 1.7: Child properties access on JSON + DataGrid
Katakan kita diberi data JSON:
[{"id":{"chmCompanyCode":"U","chmCollegeCode":"BMI","chmBlockCode":"SB-A","chmHouseCode":"1F-18"},"chmActive":"Y","chmCapacity":4,"chmCurCapacity":4,"chmFreeCapacity":0,"chmHouseDesc":"LEVEL 1","chmLevel":1}]
Untuk akses id.chmHouseCode dan set pada layout untuk datagrid:
gridLayout = [
{ name: "id", field: "id"},
{ name: "Code", field: "_item", formatter:function(item){return item.id.chmHouseCode;}},
{ name: "Name", field: "chmHouseDesc"},
{ name: "Capacity", field: "chmCapacity"}];
Cuma ubah BLUE FONT sahaja, yang lain maintain.
Masalahnya, tak boleh sorting apabila gunakan _item atau get.
[{"id":{"chmCompanyCode":"U","chmCollegeCode":"BMI","chmBlockCode":"SB-A","chmHouseCode":"1F-18"},"chmActive":"Y","chmCapacity":4,"chmCurCapacity":4,"chmFreeCapacity":0,"chmHouseDesc":"LEVEL 1","chmLevel":1}]
Untuk akses id.chmHouseCode dan set pada layout untuk datagrid:
gridLayout = [
{ name: "id", field: "id"},
{ name: "Code", field: "_item", formatter:function(item){return item.id.chmHouseCode;}},
{ name: "Name", field: "chmHouseDesc"},
{ name: "Capacity", field: "chmCapacity"}];
Cuma ubah BLUE FONT sahaja, yang lain maintain.
Masalahnya, tak boleh sorting apabila gunakan _item atau get.
Subscribe to:
Posts (Atom)