Quantcast
Channel: SCN : Discussion List - SAP BusinessObjects Design Studio
Viewing all articles
Browse latest Browse all 4041

SAPUI5 table bindRows

$
0
0

Hello guys,

I am currently trying to create a table with sapui5 in the Design Studio SDK and bind data from DS to it, but I cant see any values in the created table:

 

var oTable = new sap.ui.table.Table({                title: "testtab",                selectionMode: sap.ui.table.SelectionMode.Single            });                                               var oColumn = new sap.ui.table.Column({                label: new sap.ui.commons.Label({text: "Currency"}),                template: new sap.ui.commons.TextField().bindProperty("value", "currency"),                sortProperty: "currency",                filterProperty: "currency",                width: "100px"            });                       var oModel = new sap.ui.model.json.JSONModel();            oModel.setData({dimensions: meta_data.dimensions});                       oTable.bindRows("/dimensions");            oTable.setModel(oModel);            oTable.sort(oTable.getColumns()[0]);            oTable.placeAt(this.$());

My data source is a cube metadata, e.g:

 

{ dimensions: { key: currency, text: Currency, members: [ { key: 001, text: EUR }, { key: 002, text: USD } ] }

Json above is just an example. (Not the full object)

The problem is that the required values are in the "members" -> How can I bind them correct?

The result should be a table like the one you see when you go on "Edit Initial View".

 

Best regards,

Adam


Viewing all articles
Browse latest Browse all 4041

Trending Articles



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