Skip to Content

UI5 List update - inconsistent behaviour when browsre console on/off

Hi all,

I've got an issue where I'm trying to update the list on the left hand side of my Master-Detail Application when a new Master Item is created;

I've put the following into the callback from the creation mechanism

var myView = sap.ui.getCore().byId("master");
var myList = myView.byId("idResponsiveRepairsSet");
var binding = myList.getBinding("items");

And I've added a "Request Completed" on the Master-List's model:

	    	  console.log("oModel from Master Attach request completed")

Now the interesting thing is, if I've got the console open, I see the attachRequestCompleted log message "oModel from Master Attach request completed", and in the browser, the Master-List gets the new Master-List Item.

If I've not got the console open, the List on the Left Hand Side doesn't get updated...

It feels like the console is making something happen to the model that I need to put in to my oModel.attachRequestCompleted function; I tried a model refresh, but from what I could tell, that just caused an infinite loop - so now I'm not sure whether


>just updates the frontend elements (lists, tables, dropdowns etc) with recently read data,


>calls the backend for new data...

Any help really appreciated. I've looked at the documentation and followed the instructions as best I can, but not sure why there's inconsistent behaviour between console-on and console-off!? My best guess is that there's some kind of cache issue; i.e. when the console is on, browser wants to monitor network traffic, so actually makes the call, when console is off, browser assumes it can make use of the most recent back-end call?

Add a comment
10|10000 characters needed characters exceeded

Related questions

0 Answers

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.