on 05-05-2022 9:32 PM
Hi Experts,
I am using dialog box for confirmation I am able to get the POP up box but the content is not getting displayed.
Can any one pls let me know am i missing something during the dialog box creation.
Please find the code & screen shot attached.
var dialog = new Dialog({
title: "Confirm",
type: "Message",
content: new Text({
text: "Record Already exists,Are you sure you want to continue?"
}),
beginButton: new Button({
text: "Confirm",
press: function() {
//Confirm Button Click Event
dialog.close();
}
}),
endButton: new Button({
text: "Cancel",
press: function() {
//Cancel Button Click Event
dialog.close();
}
}),
afterClose: function() {
dialog.destroy();
}
});
this.getView().addDependent(dialog);
dialog.open();<br>
Have you defined the sap.m.Text dependency (AMD) at the beginning of the controller file and added the alias to the controller function? Either do this:
sap.ui.define([
"sap/ui/core/mvc/Controller",
"sap/m/Dialog",
"sap/m/Button",
"sap/m/Text"
], function(Controller, Dialog, Button, Text) {
.......
or replace the Text control declaration within the dialog's content aggregation as below:
....
content: new sap.m.Text({
text: "Record Already exists,Are you sure you want to continue?"
}),
......
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
6 | |
6 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.