0

I need to replace sap.m.table to sap.ui.table. I realized the table contain "updateFinished" method. If using sap.ui.table, what should i use? Please help.

userfrh
  • 47
  • 2
  • 9

2 Answers2

3

For m.Table the event "updateFinished" is fired after the binding is updated and processed. For ui.table.Table the closest event would be "rowsUpdated":

This event is fired after the table rows have been updated due to rendering, a model update, or a user interaction, for example.

https://sapui5.hana.ondemand.com/1.86.0/#/api/sap.ui.table.Table%23events/rowsUpdated

So this would be also triggered on eg scrolling the table, so you have adapt your code to handle only certain events.

user1882585
  • 313
  • 2
  • 5
  • sadly only since 1.86,... anyone found a solution that works in prior versions? the events of the binding dont work, because the rows change after those are triggered – Erch Sep 09 '22 at 14:24
3

rowsUpdated is only available in 1.86 and newer versions.

If you are not using the latest version I would suggest the following approach:

Your binding also triggers events which can be handled in your controller.

<table:Table rows="{
        path: '/TableRowSet',
        events: {
            dataRequested: '.onDataRequested',
            dataReceived: '.onDataReceived',
            change: '.onChange'
        }
    }" />

These events are documented here.

Marc
  • 6,051
  • 5
  • 26
  • 56