Skip to Content

dialog opens blank screen SAP ui5

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();	
			});
			});
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    Apr 13 at 12:23 PM

    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.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 12 at 11:17 AM

    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

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 12 at 01:20 PM

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

    Add comment
    10|10000 characters needed characters exceeded