
sap.ui.define([
"sap/ui/core/mvc/Controller"
], function (Controller) {
"use strict";
return Controller.extend("sap.ui.demo.walkthrough.controller.App", {
onShowHello : function () {
// show a native JavaScript alert
alert("Hello World");
}
});
});
<core:FragmentDefinition
xmlns="sap.m"
xmlns:core="sap.ui.core">
<Dialog core:require="{ handler: 'sap/ui/demo/walkthrough/module/HelloDialog'}"
id="helloDialog"
title="Hello {/recipient/name}">
<Button text="Button in Dialog"
press="handler.onRaiseMessage"></Button>
</Dialog>
</core:FragmentDefinition>
sap.ui.define([
"sap/m/MessageToast"
], function (MessageToast) {
'use strict';
var privateMethod_1 = function () {
MessageToast.show("Active private method");
};
return {
onRaiseMessage: function (oEvent) {
privateMethod_1();
}
}
});
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
21 | |
21 | |
21 | |
21 | |
15 | |
9 | |
9 | |
9 | |
7 | |
7 |