on ‎2019 Jan 07 4:32 PM
Hi experts,
I have a report table that is populated in three different ways, depending on selection filters. At the end of the called report I use the "updateFinished" event to loop through the table entries, paint them zebra style and paint last summary line pink.
SAPUI5 Application version is 1.44.12
this.oStsTable = this.getView().byId("statusReportTable");
this.oStsTable.attachEventOnce("updateFinished", function(oEv) {
var aItems = oEv.getSource().getItems();
if (aItems && aItems.length > 0) {
for (var i = 0; i < aItems.length; i++) {
if (i === aItems.length - 1) {
aItems[i].addStyleClass("pinkBackground");
} else {
var even = i % 2;
if (even !== 0 && i < aItems.length) {
aItems[i].addStyleClass("cyanBackground");
}
}
}
}
});
this.byId("statusReportTable").getBinding("items").filter(oTableSearchState);
With the data available, I get back 3 datasets. 7 for case 1, 7 for case 2 and 23 for case 3. With the first two cases everything is OK. Problem is with case 3 (23 records). Debugging on the back-end, I see 23. When table appears, I see again 23. But the getItems() method within "updateFinished" event sees only 20 (!). As result of it (yes, guessed right), line 20 goes pink and the remaining lines without color as loop exits.
Rings any bells?


Request clarification before answering.
Hi,
Could you show the debug calls with the data?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
| User | Count |
|---|---|
| 15 | |
| 9 | |
| 6 | |
| 5 | |
| 4 | |
| 4 | |
| 3 | |
| 2 | |
| 2 | |
| 2 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.