Let's follow up this discussion at the Neptune Community
(this forum will be kept in read-only mode)
I am facing some problems about control MessagePopover.
1) First of all, I would like to understand if the object sap.m.MessagePopoverItem works correctly on NAD. I tried to set one of this item under the control MessagePopover but with no effect. Also the sample at MessagePopover Sample have more Item under popover in the designer but when running app, no message is shown.
// get textarea content var insert_message = MsgTextPopover.getValue(); // create new item for MessagePopover var po_item = new sap.m.MessagePopoverItem(); // set its properties po_item.setDescription("Messaggio " + insert_message); po_item.setTitle(insert_message); // XXX message type po_item.setType(sap.ui.core.MessageType.Error); // trick oMessagePopover.toggle(this); oMessagePopover.toggle(this); // insert new item in MessagePopover oMessagePopover = oMessagePopover.insertItem(po_item,1); // retrieve message number in MessagePopover ... var items = oMessagePopover.getItems(); // ... and set number of message on button ButtonMessagePopover.setText("Messaggi: " + items.length ); // XXX button style ButtonMessagePopover.setType(sap.m.ButtonType.Reject);
Am I missing something?
Thanks and regards
The MessagePopOver example was incomplete, so a big thank you for the heads up !
sap.m.MessagePopoverItem works as an aggregation of sap.m.MessagePopover. Typically you will bind sap.m.MessagePopOver to a table which gets populated with the messages in the backend processing.
I have corrected the MessagePopover Sample so you can check it out. Please remember that you can always check the ABAP code by clicking on
Have a nice week and happy coding :) kind regards,