sap.ui.define([ "sap/m/MessageBox", "sap/ui/core/mvc/Controller" ], function (MessageBox, Controller) { "use strict"; return Controller.extend("your.namespace.controller.App", { onInit: function () { // Initialization code here }, onShowAlert: function () { MessageBox.alert("This is a Fiori alert!"); } }); });
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter