My data is in the following format:
Code:
{
"ProgramList":{
"StartIndex":"0",
"Count":"24",
"TotalAvailable":"24",
"AsOf":"2012-06-05T01:16:14Z",
"Version":"0.25.20120408-1",
"ProtoVer":"72",
"Programs":[
{
"StartTime":"2012-06-05T01:36:00Z",
"EndTime":"2012-06-05T02:00:00Z",
"Title":"Babar",
"SubTitle":"Tutu Badou\/Hidden Courtyard",
"Description":"The iconic tales of Babar return.",
"Channel":{
"ChanId":"1022",
"ChanNum":"22",
"CallSign":"ABC2 \/ ABC4",
"IconURL":"\/Guide\/GetChannelIcon?ChanId=1022",
"ChannelName":"ABC2 \/ ABC4"
},
"Recording":{
"Status":"-1",
"Priority":"-1",
"StartTs":"2012-06-05T01:33:00Z",
"EndTs":"2012-06-05T02:07:00Z"
}
},
{
"StartTime":"2012-06-05T09:00:00Z",
"EndTime":"2012-06-05T10:00:00Z",
"Title":"Masterchef Australia",
"SubTitle":"Tuesday - Week 5",
"Description":"With the chance to compete in ...",
"Channel":{
"ChanId":"1010",
"ChanNum":"10",
"CallSign":"TEN Digital",
"IconURL":"\/Guide\/GetChannelIcon?ChanId=1010",
"ChannelName":"TEN Digital"
},
"Recording":{
"Status":"-1",
"Priority":"1",
"StartTs":"2012-06-05T08:57:00Z",
"EndTs":"2012-06-05T10:07:00Z"
}
}
]
}
I'm trying to display the information in a DataView with useComponents: true.
I have defined a model and associated models for the store (and set rootProperty appropriately). This works well and the data is read in along with the associated data. I can display the individual fields for each record (eg: StartTime or Title), but I can't work out how to access or display the associated records (eg: Channel.CallSign or Recording.Status).
With XTemplates I can loop over the children of a "field" in a record to display that information.
How can I achieve similar with DataViews/DataItems and useComponents?
Should I be trying to create a sub-DataView for the associated records to display information from them?
If so, how do I define the dataMap to pass the store in the applyXXX method for the field?
Example code & data: http://www.senchafiddle.com/#sZpSy