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

How can I join two models?

$
0
0

Hi all,

 

Hi want to manage (hide show) columns in a table, which fill out from odata service. I have a json model for the columns visibility and i would like to join both model

 

var data = {    visibleColumns: {        firstName: true,        lastName: true    },    Results: [ // from xsodata        { firstName: "XXX", lastName: "AAA" },        { firstName: "YYY", lastName: "BBB" }    ] 
};

Something like that to do:

new sap.ui.table.Column({    visible: "{/visibleColumns/firstName}",    label: new sap.ui.commons.Label({ text: "First Name" }),    template: new sap.ui.commons.TextView({ text: "{firstName}" })
});
new sap.ui.commons.CheckBox({    text: "First Name",    checked: "{/visibleColumns/firstName}"
});

Thanks!


Viewing all articles
Browse latest Browse all 9091

Trending Articles



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