on 2019 Apr 01 12:08 PM
I have a ui.table and I bind a JSON model to it. That worked fine the whole time but apparently I made some changes that caused the data to disappear. When getting the binding of the table, I see data but the bindingContext is "undefined".
I'm also applying a rowSettingsTemplate and that gets applied correctly. So e.g. 4 of my rows are highlighted and it's exactly the rows that should be highlighted. So somehow the data is there but it's simply not shown..
This is my code:
var changedModel = new sap.ui.model.json.JSONModel();
// merge new, update and remaining data in one model
var changedData = _.concat(insert, update, remaining);
changedData = _.sortBy(changedData, [function(o) { return Object.values(o)[0]; }]);
var oColumns = this.getColumnNames(changedData);
changedModel.setData({
columns: oColumns,
rows: changedData,
});
backendTable.setModel(changedModel, "changedModel");
// highlighting for new/update data
var rowSettingsTemplate = new sap.ui.table.RowSettings({
highlight: {
path: "changedModel>highlight",
formatter: formatter.checkHighlight
}
});
backendTable.setRowSettingsTemplate(rowSettingsTemplate);
// bind rows
backendTable.bindRows("changedModel>/rows");
Please let me know anything I'm doing wrong..
Would need to see the code for the view. Usually if you see a certain number of rows but no data it means the binding to the model is incorrect for the fields in the table.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
62 | |
9 | |
8 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.