Skip to content
This repository has been archived by the owner on Jul 6, 2022. It is now read-only.

Commit

Permalink
added the personal information warning diaglog to webshop and retailer
Browse files Browse the repository at this point in the history
  • Loading branch information
skrishnakumar committed May 21, 2018
1 parent 34d3fee commit 380386b
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
sap.ui.define([
"sap/ui/core/mvc/Controller"
], function(Controller) {
"sap/ui/core/mvc/Controller",
"sap/m/Dialog",
"sap/m/Button",
"sap/m/Text"
], function(Controller, Dialog, Button, Text) {
"use strict";

return Controller.extend("com.sap.espm.retailer.controller.App", {
Expand Down Expand Up @@ -28,9 +31,28 @@ sap.ui.define([
* This hook is the same one that SAPUI5 controls get after being rendered.
* @memberOf com.sap.espm.retailer.view.App
*/
// onAfterRendering: function() {
//
// },
onAfterRendering: function() {
if (!this.pressDialog) {
this.pressDialog = new Dialog({
title: 'Important Information',
content: new Text({
text: "ESPM is a demo application. So, please do not enter any real personal information when using the application"
}),
beginButton: new Button({
text: 'Close',
press: function () {
this.pressDialog.close();
}.bind(this)
})
});

//to get access to the global model
this.getView().addDependent(this.pressDialog);
}

this.pressDialog.open();

},

/**
* Called when the Controller is destroyed. Use this one to free resources and finalize activities.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,23 +1,47 @@
sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/m/Dialog",
"sap/m/Button",
"sap/m/Text",
"com/sap/espm/shop/model/formatter",
"sap/ui/core/UIComponent",
"sap/ui/core/mvc/ViewType",
"sap/m/MessageToast",
"sap/ui/model/odata/ODataModel",
"sap/ui/model/json/JSONModel"
], function(Controller) {
], function(Controller, Dialog, Button, Text) {
"use strict";

return Controller.extend("com.sap.espm.shop.controller.App", {

onInit:function()
{


},
onAfterRendering: function()
{

if (!this.pressDialog) {
this.pressDialog = new Dialog({
title: 'Important Information',
content: new Text({
text: "ESPM is a demo application. So, please do not enter any real personal information when using the application"
}),
beginButton: new Button({
text: 'Close',
press: function () {
this.pressDialog.close();
}.bind(this)
})
});

//to get access to the global model
this.getView().addDependent(this.pressDialog);
}

this.pressDialog.open();

},
onBeforeRendering: function()
{
Expand Down

0 comments on commit 380386b

Please sign in to comment.