Skip to Content
0

dialog opens blank screen SAP ui5

Apr 12 at 08:04 AM

47

avatar image

Dear SAP Guru's

I have a dialog once I close the dialog and go back a screen with out the Reload, there is no issue. But once I add the window.location.reload in it It shows me a blank page.

What did I wrong in my code?

See code:

	return new Promise(function(fnResolve, oBindingContext) {
oDialog.attachEventOnce("afterClose", null, fnResolve);
				oDialog.close();
			return new Promise(function(route, data) {
	                                window.history.go(-1);
					window.location.reload();	
			});
			});
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

3 Answers

Best Answer
N. van Nieuwenhoven Apr 13 at 12:23 PM
0

Hi All,

It kept working when I was in debugger mode (f12)

So What I did was I added a wait:

This=that
window.history.go(-1);
that.wait(300);
window.location.reload();

Then it worked

	wait: function(ms) {
	var start = new Date().getTime();
	var end = start;
	while (end < start + ms) {
	end = new Date().getTime();
}
}, 

Thank you all for your help.

Share
10 |10000 characters needed characters left characters exceeded
Desiree Matas
Apr 12 at 11:17 AM
1

Hello,

The issue seems more related to javascript itself than to SAPUI5. Not sure if you are mixing browser history navigation with javascript navigation, which are different concepts. Check the following documentation: https://sapui5.netweaver.ondemand.com/#/topic/1b6dcd39a6a74f528b27ddb22f15af0d

Best regards,

Désirée

Show 1 Share
10 |10000 characters needed characters left characters exceeded

Hi Désirée,


Thank you so much for your answer. The Navigation works perfect, the issue is the reloading part of the page.

Kind Regards,
Nitin

0
Jun Wu Apr 12 at 01:20 PM
1

copy the same url,which gives you blank screen, can you open it in another tab?

Show 2 Share
10 |10000 characters needed characters left characters exceeded

Hi Jun Wu,

I can not open it in a different tap, With the window.location.reload(); added it did not navigate back.

N. van Nieuwenhoven

0
N. van Nieuwenhoven

seems your app just not able to handle that url

0