Skip to Content
1
Dec 11, 2019 at 08:17 AM

How do I "go deeper" in message popover?

117 Views Last edit Dec 11, 2019 at 09:33 AM 2 rev

I have the following code:

<core:FragmentDefinition xmlns="sap.m" xmlns:core="sap.ui.core">
<MessagePopover id="popoverNavCon" items="{ToMessages}">
<MessageItem title="{Msgtx}" type="{= ${Msgty} === 'E' ? 'Error' : ${Msgty} === 'W' ? 'Warning' : 'Success'}"/>
</MessagePopover>
</core:FragmentDefinition>
handleMessagePopoverPress: function (oEvent) {
var oButton = oEvent.getSource();
var oContext = oButton.getBindingContext();
var sPath = oContext.getPath();
// create popover
if (!this._oPopover) {
Fragment.load({
id: "popoverNavCon",
name: "InterfaceMonitor.InterfaceMonitor.view.PopoverMessage",
controller: this
}).then(function (oPopover) {
this._oPopover = oPopover;
this.getView().addDependent(this._oPopover);
this._oPopover.bindElement(sPath);
this._oPopover.openBy(oButton);
}.bind(this));
} else {
this._oPopover.bindElement(sPath);
this._oPopover.openBy(oButton);
}
},

It allows me to see the results from https://imodataservicep2001270708trial.hanatrial.ondemand.com/im-odata-service-2.0.0/Executions(Exeid='20190417070000',Intid='BF01.1')/ToMessages?$format=json

How do I add links to the items in the popover, so I could click and see its children messages in the same popever (ToChildred in the model, I suppose)? What is the proper way to do it?