<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>Question Re: Binding Nested JSON Model in XML View in Technology Q&amp;A</title>
    <link>https://community.sap.com/t5/technology-q-a/binding-nested-json-model-in-xml-view/qaa-p/673939#M177280</link>
    <description>&lt;P&gt;I figured the solution out, thanks your comment helped!&lt;/P&gt;</description>
    <pubDate>Fri, 17 Aug 2018 05:47:39 GMT</pubDate>
    <dc:creator>huibin_lau</dc:creator>
    <dc:date>2018-08-17T05:47:39Z</dc:date>
    <item>
      <title>Binding Nested JSON Model in XML View</title>
      <link>https://community.sap.com/t5/technology-q-a/binding-nested-json-model-in-xml-view/qaq-p/673935</link>
      <description>&lt;P&gt;Hi Experts,&lt;/P&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;P&gt;I have a nested JSON model named salesOrderModel as below and I am trying to bind it to a list in a XML view to display all the product names in the "products" array.&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;{
	"orders": [
		{
			"orderId": 0,
			"orderName": "Order 1",
			"products": [
				{
					"productId": 0,
					"productName": "Product 1-A"
				},
				{
					"productId": 1,
					"productName": "Product 1-B"
				},
				{
					"productId": 2,
					"productName": "Product 1-C"
				},
				{
					"productId": 3,
					"productName": "Product 1-D"
				},
				{
					"productId": 4,
					"productName": "Product 1-F"
				}
			]
		}
	]
}
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;I am doing the binding in the XML view as below&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;View
	xmlns="sap.m"
	xmlns:layout="sap.ui.layout"
	controllerName="test.View1"&amp;gt;
	&amp;lt;Page
		title="{salesOrderModel&amp;gt;orderName}"
		navButtonPress="onNavBack"
		showNavButton="{device&amp;gt;/system/phone}"&amp;gt;
		&amp;lt;content&amp;gt;
					&amp;lt;List id="products" 
						items="{salesOrderModel&amp;gt;/orders}"
						headerText="Products"&amp;gt;
					&amp;lt;items&amp;gt;
						&amp;lt;StandardListItem title="{salesOrderModel&amp;gt;products/productName}" 
							type="Active"
							press="onSelectionChange"/&amp;gt;
					&amp;lt;/items&amp;gt;
				&amp;lt;/List&amp;gt;
		&amp;lt;/content&amp;gt;
	&amp;lt;/Page&amp;gt;
&amp;lt;/View&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;The binding path at runtime is incorrect.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/199282-capture.jpg" /&gt;&lt;/P&gt;
  &lt;P&gt;How can I correct the path and display the correct information? Thanks.&lt;/P&gt;
  &lt;P&gt;Regards,&lt;/P&gt;
  &lt;P&gt;Hui Bin&lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 14:45:58 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/binding-nested-json-model-in-xml-view/qaq-p/673935</guid>
      <dc:creator>huibin_lau</dc:creator>
      <dc:date>2018-08-16T14:45:58Z</dc:date>
    </item>
    <item>
      <title>Re: Binding Nested JSON Model in XML View</title>
      <link>https://community.sap.com/t5/technology-q-a/binding-nested-json-model-in-xml-view/qaa-p/673936#M177277</link>
      <description>&lt;P&gt;you should bind your List to the orders/products rather than the orders&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;						items="{salesOrderModel&amp;gt;/orders/products}"&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;then in your items remove products since you have binded that already&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;StandardListItem title="{salesOrderModel&amp;gt;/productName}" &lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 16 Aug 2018 14:48:44 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/binding-nested-json-model-in-xml-view/qaa-p/673936#M177277</guid>
      <dc:creator>SergioG_TX</dc:creator>
      <dc:date>2018-08-16T14:48:44Z</dc:date>
    </item>
    <item>
      <title>Re: Binding Nested JSON Model in XML View</title>
      <link>https://community.sap.com/t5/technology-q-a/binding-nested-json-model-in-xml-view/qaa-p/673937#M177278</link>
      <description>&lt;P&gt;Hi &lt;A href="https://answers.sap.com/users/7542/sergioguerrero.html"&gt;Sergio Guerrero&lt;/A&gt;, &lt;/P&gt;
  &lt;P&gt;I tried exactly as you said but at runtime the path is invalid.&lt;/P&gt;
  &lt;P&gt;&lt;IMG class="migrated-image" src="https://community.sap.com/legacyfs/online/storage/attachments/storage/7/attachments/199292-capture.jpg" /&gt;&lt;/P&gt;
  &lt;P&gt;Any idea what's wrong? &lt;/P&gt;</description>
      <pubDate>Thu, 16 Aug 2018 16:13:42 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/binding-nested-json-model-in-xml-view/qaa-p/673937#M177278</guid>
      <dc:creator>huibin_lau</dc:creator>
      <dc:date>2018-08-16T16:13:42Z</dc:date>
    </item>
    <item>
      <title>Re: Binding Nested JSON Model in XML View</title>
      <link>https://community.sap.com/t5/technology-q-a/binding-nested-json-model-in-xml-view/qaa-p/673938#M177279</link>
      <description>&lt;PRE&gt;&lt;CODE&gt;items="{salesOrderModel&amp;gt;/orders/0/products}"&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;&lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;&amp;lt;StandardListItem title="{salesOrderModel&amp;gt;productName}" type="Active"
							press="onSelectionChange"/&amp;gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 17 Aug 2018 01:27:05 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/binding-nested-json-model-in-xml-view/qaa-p/673938#M177279</guid>
      <dc:creator>junwu</dc:creator>
      <dc:date>2018-08-17T01:27:05Z</dc:date>
    </item>
    <item>
      <title>Re: Binding Nested JSON Model in XML View</title>
      <link>https://community.sap.com/t5/technology-q-a/binding-nested-json-model-in-xml-view/qaa-p/673939#M177280</link>
      <description>&lt;P&gt;I figured the solution out, thanks your comment helped!&lt;/P&gt;</description>
      <pubDate>Fri, 17 Aug 2018 05:47:39 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/binding-nested-json-model-in-xml-view/qaa-p/673939#M177280</guid>
      <dc:creator>huibin_lau</dc:creator>
      <dc:date>2018-08-17T05:47:39Z</dc:date>
    </item>
    <item>
      <title>Re: Binding Nested JSON Model in XML View</title>
      <link>https://community.sap.com/t5/technology-q-a/binding-nested-json-model-in-xml-view/qaa-p/673940#M177281</link>
      <description>&lt;P&gt;so what was the solution ?  &lt;SPAN class="mention-scrubbed"&gt;huibin.lau&lt;/SPAN&gt; &lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 05:23:16 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/binding-nested-json-model-in-xml-view/qaa-p/673940#M177281</guid>
      <dc:creator>former_member450404</dc:creator>
      <dc:date>2019-06-20T05:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Binding Nested JSON Model in XML View</title>
      <link>https://community.sap.com/t5/technology-q-a/binding-nested-json-model-in-xml-view/qaa-p/673941#M177282</link>
      <description>&lt;P&gt;Hi &lt;SPAN class="mention-scrubbed"&gt;huibin.lau&lt;/SPAN&gt;,&lt;/P&gt;&lt;P&gt;The problem is in items give it as items="{salesOrderModel&amp;gt;/orders/0/products}" &lt;/P&gt;&lt;P&gt;and in standardListItem Title give it as title="{salesOrderModel&amp;gt;productName}"&lt;/P&gt;&lt;P&gt;and all these are case-sensitive if error is coming means its because of this reason.&lt;/P&gt;&lt;P&gt;please let me know once you have done.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 12:14:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/technology-q-a/binding-nested-json-model-in-xml-view/qaa-p/673941#M177282</guid>
      <dc:creator>former_member601269</dc:creator>
      <dc:date>2019-06-20T12:14:34Z</dc:date>
    </item>
  </channel>
</rss>

