Skip to Content
Dec 11, 2020 at 04:42 AM

How to keep Message Manager OData Response after refresh the Service Model?

475 Views Last edit Jun 22, 2021 at 11:22 AM 2 rev

Hi All,

I am working on Custom SAPUI5 Application Development. In my application i need to capture the OData Service Response for the Update operation. I followed the Demo Kit Walkthrough and set the Mesagemanager Fragment like that.


I enabled the Message Manager code in my controller like below.

//code for message manager ,set message model
var oMessageManager = sap.ui.getCore().getMessageManager();
this.getView().setModel(oMessageManager.getMessageModel(), "message");
// activate automatic message generation for complete view
oMessageManager.registerObject(this.getView(), true);

After my update process i need to call the Odata Service again based on my requirement, in this case the value stored inside the MessageManager Fragment get cleared.

But if i comment the servcie call, the messages are available inside the MesageManager.

I guess it is because of initiating Servcie Call again, so it refrshed. But i wnat thaty to be keep in my messagemanager unless i manually clear it.

Please help me to sort it out.

Thank yoiu,