Skip to Content
avatar image
Former Member

SAP UI5 Application output is Blank

Hi ,

I have developed my SAP UI5 with MVC view but out is coming blank and not able to find issue . Could any one of you check code and provide issue ..
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta charset="utf-8">
<title>My First UI5</title>


		<script 
		       id="sap-ui-bootstrap"
		        src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js"
		        data-sap-ui-theme="sap_bluecrystal"
				data-sap-ui-libs="sap.m"
				data-sap-ui-compatVersion="edge"
				data-sap-ui-preload="async">
				data-sap-ui-resourcesroots='{"opensap.myapp" : "./"}'>
		</script>


<script>
	sap.ui.getCore().attachInit(function (){
			sap.ui.xmlview({
			viewname : "opensap.myapp.view.App"
		}).placeAt(content);
	});
</script>
</head>


<body class="sapUiBody" id="content">
</body>
</html>
Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Oct 11, 2017 at 02:46 AM

    Hi Ankit,

    In your index.html file there are errors, i highlighted the errors in following screen check it out.

    1) closing script tag, 2) it's resourceroots not resourcesroots, 3) viewname it should be viewName

    Here find the below is corrected code

    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <title>My First UI5</title>
    		<script 
    		       id="sap-ui-bootstrap"
    		        src="https://openui5.hana.ondemand.com/resources/sap-ui-core.js"
    		        data-sap-ui-theme="sap_bluecrystal"
    				data-sap-ui-libs="sap.m"
    				data-sap-ui-compatVersion="edge"
    				data-sap-ui-preload="async"
    				data-sap-ui-resourceroots='{"opensap.myapp" : "./"}'>
    		</script>
    
    
    		<script>
    			sap.ui.getCore().attachInit(function (){
    					sap.ui.xmlview({
    					viewName : "opensap.myapp.view.App"
    				}).placeAt(content);
    			});
    		</script>
    </head>
    <body class="sapUiBody" id="content">
    </body>
    </html>

    Regards,

    Vedaradhya.

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Oct 11, 2017 at 06:45 AM
    Add comment
    10|10000 characters needed characters exceeded