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

Deep binding in sap.m.Table

$
0
0

Hi everyone,

 

right now I have a little issue regarding the binding of properties in an object that is inside an object like this:

[

     {

          "FirstName" : "Hans",

          "LastName" : "Meier",

          "Car" :

           {

                "Brand" : "Volkswagen",

                "Model" : "Up"    

           }

     },

     {

          "FirstName" : "Klaus",

          "LastName" : "Müller",

          "Car" :

           {

                "Brand" : "Mercedes",

                "Model" : "GLK"    

           }

     }

]

This data is stored in the JSONModel "ViewModel". My table looks like this:

<Table items="{path: 'ViewModel>/'}" >  <columns>       <Column>            <Text text="Firstname" />            <Text text="Lastname" />            <Text text="Brand of Car" />            <Text text="Carmodel" />       </Column>  </columns>  <items>      <ColumnListItem>            <cells>                 <Text text="{ViewModel>FirstName}" />                 <Text text="{ViewModel>LastName}" />                 <Text text="{ViewModel>Car/Brand}" />                 <Text text="{ViewModel>Car/Model}" />            </cells>       </ColumnListItem>  </items></Table>

The table shows the Names but it doesn't show the properties of the cars. When I look into the SAPUI5 Diagnostics tool, the Text control shows me a valid path to the data but the text is empty.

 

Does anyone know more about the deep binding of data in tables?

Thanks a lot!


Viewing all articles
Browse latest Browse all 3273

Trending Articles



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