cancel
Showing results for 
Search instead for 
Did you mean: 

Removing a Message from MessageManager

0 Kudos

Hey Experts,

i'm adding a message to the MessageManager but how to remove a Message?

https://sapui5.hana.ondemand.com/#docs/guide/a90d93df5a024e8bb18826b699c9aaa7.html


this._oMessageManager.addMessages(

  new sap.ui.core.message.Message({

  id: oSource.getId() + "Message",

  message: this.getResourceBundle().getText("error.valueNotValid.messageText"),

  description: this.getResourceBundle().getText("error.valueNotValid.messageDescription"),

  type: sap.ui.core.MessageType.Error,

  target: oSource.getId() + "/value",

  processor: this._oMessageProcessor,

persistent: true

  })

);

The Message should also be remove from the MessagePopover.

I'm working with version 1.32.5 and WebIDE.

looking forward to your reply

Thanks

Simon

Accepted Solutions (0)

Answers (1)

Answers (1)

ChandraMahajan
Active Contributor
0 Kudos

Hi,

Check SAPUI5 SDK - Demo Kit

-Chandra

0 Kudos

Thanks for your reply.

I tried this before but it does not work.

How you use this Method? My idea was to create exactly the same message and pass it to the removeMessage Method, but this does not work.


this._oMessageManager.removeMessages(new sap.ui.core.message.Message({

  id: oSource.getId() + "Message",

  message: this.getResourceBundle().getText("error.valueNotValid.messageText"),

  description: this.getResourceBundle().getText("error.valueNotValid.messageDescription"),

  type: sap.ui.core.MessageType.Error,

  target: oSource.getId() + "/value",

  processor: this._oMessageProcessor,

  persistent: true

  })

);

A Method like removeMessageByTarget or something like that would be great.

Regards

justin_kemp
Participant
0 Kudos

Hi

Did you found a solution to this?


How to remove an indivdual message from MessageManager. I checked SAPUI5 SDK - Demo Kit but this does not seem to work for me. I also opened a new thread but dont get any responses there.