cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

getItems() method for table returns up to 20 rows

Former Member
0 Likes
2,376

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?

View Entire Topic
jorge_cabanas
Participant

Hi,

Could you show the debug calls with the data?