Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8533

Re: Binding an XML list control to a JSON model

$
0
0

Hi Conrad,

 

I can find two issues in your code.

 

  1. Your shortdatamodel JSON is not having options in a array []. Aggregation binding works with arrays. See below for example of the data
  2. When using binding with leading "/", it points to the root of the model. You should not use "/" in aggregation binding loops. Use "{option/image}" instead.

 

 

Examples:

 

1. Example json data:

"short": [

  {

    "option": {

      "optionName": "option1", "id": "001"..., "labeltext": "Test Item 1",...

   }

  },

  {

    "option": {...

 

    }

  }

]

 

2. Aggregation binding:

<Label id... text="{option/image}"

 

Regards,

Kimmo


Viewing all articles
Browse latest Browse all 8533

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>