2013-09-03 4 views
1
1.Array Type 

{"DATA": 
[ 
{"CategoryID":"3","CategoryName":"News","CountryID":"1","Result":"OK"}, 
{"CategoryID":"4","CategoryName":"Daily Paper","CountryID":"1","Result":"OK"}, 
{"CategoryID":"5","CategoryName":"Thanthi","CountryID":"1","Result":"OK"}, 
{"CategoryID":"1","CategoryName":"Newspaper","CountryID":"1","Result":"OK"}, 
{"CategoryID":"2","CategoryName":"Magazine","CountryID":"1","Result":"OK"} 
] 
} 

2.Direct Type 
[ 

{"CategoryID":"3","CategoryName":"News","CountryID":"1","Result":"OK"}, 
{"CategoryID":"4","CategoryName":"Daily Paper","CountryID":"1","Result":"OK"}, 
{"CategoryID":"5","CategoryName":"Thanthi","CountryID":"1","Result":"OK"}, 
{"CategoryID":"1","CategoryName":"Newspaper","CountryID":"1","Result":"OK"}, 
{"CategoryID":"2","CategoryName":"Magazine","CountryID":"1","Result":"OK"} 

] 

pour la déclaration de type directe --->tableau JSON listview en cascades blackberry

ListItemComponent { 
type: "listItem" 
StandardListItem { 
title: ListItemData.CategoryName 
} 
} 

ma question est de savoir comment déclarer titre: ListItemData ???. ???? pour le premier modèle de tableau JSON

Répondre

1

essayer cette

ListItemComponent { 
type: "listItem" 
StandardListItem { 
title: ListItemData.DATA[0].CategoryName 
} 
} 
Questions connexes