Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 2161

sap.m.Table not rendering items that are updated in its model.

$
0
0

Hi UI5 Developers,

 

I'm having a problem getting the sap.m.Table to update itself (without using 'rerender()'). I have code very similar to this snippix:

 

http://veui5infra.dhcp.wdf.sap.corp:8080/snippix/snippets/29496.html

 

More Info:

 

I have a custom control that contains a table which is bound to its own model. The custom control inherits from another custom control that handles some common stuff for all of my custom controls, one of these is an optional service call that will get the items for a table. What I need is to be able to initialize the table, then once the call is made, just update the tables model with the result and have it be displayed.

 

Sounds simple, but when I implement it similar to how it's done in the snippix, the model is successfully updated, the binding seems to be updated, the call to 'getItems()' even returns the updated list! Yet the table doesn't update the UI with the new list values.

 

As you can see from the snippix below, everything is updated, but the UI is showing nothing (I've even seen the DOM flashing as it's updated, but still no list items as there should be).

 

bindTableBug.PNG

 

As I mentioned explicitly triggering a 'rerender()' of the table works, but I don't want to use that call due to its potentially expensive nature and the inherent bad practice.


I'm using SAPUI5 1.36.5, I've also tried unbinding and rebinding on the updated list, as well as using a named model for the table, but nothing seems to be working.


Any help would be greatly appreciated.


Kind Regards,

Robbie O'Brien.


Viewing all articles
Browse latest Browse all 2161

Trending Articles