so at the minute I have a view that looks something like this.
var oPopOver = new sap.m.Link({
text:"PopOver",
press : function() {
oController.getPopOver()
},
}).addStyleClass("PopOver");
Then I'd assume in the controller I'd have something similiar to this:
getPopOver: function(oEvent) {
$(function () {
$('#example').popover();
});
}
I just dont understand where all the popover stuff goes I've previously worked with Java and I am a SAP ABAP Developer but this is our first SAP UI5 project which means we need to do some web development using javascript etc. So any help with this would be great I been following tutorials fine but they all seem to show putting the popover information in the html tags etc.
Use sap.m.Popover
JS view
var link = new sap.m.Link("link", {
text: "Click for Popover",
press: function() {
oController.handleLinkPress()
},
})
controller
handleLinkPress: function(e) {
var link = this.getView().byId("link");
var oPopover = new sap.m.Popover({
title: "Sample Popover",
content: [new sap.m.Image({
src: "https://www.google.co.in/images/branding/googlelogo/2x/googlelogo_color_272x92dp.png",
width: "150px"
})],
footer: [new sap.m.Button({
text: "Click me!"
})]
});
oPopover.openBy(link);
}