Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

Table Binding Repeat Rows

$
0
0

I have a table bound to a Gateway service. The service returns the values I want, but in UI5 the table repeats rows and doesn't iterate through the results that the service returns. When first loaded, the entire table shows the same row. It will change to a new row when scrolled, but it's quirky.

 

Here is one of the columns of the table:

 

var oTable = new sap.ui.table.Table({          visibleRowCount: 20,          firstVisibleRow: 0,          selectionMode : sap.ui.table.SelectionMode.None
});

oTable.addColumn(new sap.ui.table.Column({
          label : new sap.ui.commons.Label({                    text : "Field"          }),          template : new sap.ui.commons.TextView({                    text : "{Ftext}"          })
}));

 

And here is the binding:

 

var sUrl = "/sap/opu/odata/sap/Z_RG7_SRV/";

var oModel = new sap.ui.model.odata.ODataModel(sUrl);

oTable.setModel(oModel);

var oFilter = new sap.ui.model.Filter("Objectid", sap.ui.model.FilterOperator.EQ, "8000000215");
oTable.bindRows("/ChangeLogSet", null, null, [oFilter]);

 

Any ideas?


Viewing all articles
Browse latest Browse all 6178

Trending Articles



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