Skip to Content
0

sap.m.MessageBox.show on close is going endless without control

Aug 30, 2017 at 01:03 PM

50

avatar image

Hi

I have a scenario, where I need to display the message , I can able to successfully display the message but the control is not coming back to the screen as it is going as loading the program.

Please find the code.

sap.m.MessageBox.show("Please enter your user-ID instead of email-id", {

icon: sap.m.MessageBox.Icon.NONE,

title: "", actions: sap.m.MessageBox.Action.YES,

onClose:function(oAction) {

if (oAction === sap.m.MessageBox.Action.YES) { this.loadDisplayMode(Email); }

}

thanks

Vijay

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Vikas Trivedi Aug 30, 2017 at 01:20 PM
0

Hi Vijay,

I think, your function, this.loadDisplayMode(Email); is not getting called, as "this" will return the MessageBox object.

Please try the below code.

var that = this;
sap.m.MessageBox.show(
sMessage, {
icon: sap.m.MessageBox.Icon.NONE,
title: "",
actions: sap.m.MessageBox.Action.YES,
onClose: function(oAction) {
if (MessageBox.Action.YES === oAction) {
that.loadDisplayMode(Email);
}
}
}
);

Regards,

Vikas Trivedi

Share
10 |10000 characters needed characters left characters exceeded
Vijay Vikram
Aug 30, 2017 at 01:30 PM
0

HI Vikas,

thanks for your reply and it did not work. I have attached the screenshot as well.

Thanks
vijay


endless.png (5.6 kB)
Share
10 |10000 characters needed characters left characters exceeded
avatar image
Former Member
Aug 30, 2017 at 10:02 PM
0

somewhere in your code, you have the busy state turn on...

Share
10 |10000 characters needed characters left characters exceeded
Sharath M G Aug 31, 2017 at 02:41 AM
0

In you code, there were some minor JS errors. I fixed and tried; it works.

Check the attached screenshot. Your code snippet is:

			showTextInfo: function(oEvent) {
                        var that = this;
			sap.m.MessageBox.show("Please enter your user-ID instead of email-id", {
			   icon: sap.m.MessageBox.Icon.NONE,
			   title: "", 
			   actions: sap.m.MessageBox.Action.YES,
			   onClose:function(oAction) {
			   if (oAction === sap.m.MessageBox.Action.YES) { 
				that.loadDisplayMode(); 				
			  }
			}
			});


Share
10 |10000 characters needed characters left characters exceeded