cancel
Showing results for 
Search instead for 
Did you mean: 

Code Display Blank Page

former_member591236
Discoverer
0 Kudos

Dear Members,

I am new to SAPUI5. The following code is not working on my Sap WebIDE. When I run the index.html it shows the blank page.

The Code is as under

Index.html

 <!DOCTYPE html >
  <!--Use the xml view from folder view -->
<html>
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
		<meta charset="UTF-8">
		<title>OpenSAP - Developing Web Apps with SAPUI5</title>
		
		<script
			id="sap-ui-bootstrap"
			src="https://sapui5.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.week1u21.view.App"
			}).placeAt("content");
		});
	</script>
</head>
<body class="sapUiBody" id="content">
</body>
</html>

App.view.xml

<mvc:View
	displayBlock="true"
	xmlns:mvc="sap.ui.core.mvc"
	xmlns="sap.m">
	<Carousel>
		<Pages>
		<Image 
		src="https://upload.wikimedia.org/wikipedia/commons/0/0e/GEO_Globe_10.jpg" 
		height="400px"/>
		<Image 
		src="https://upload.wikimedia.org/wikipedia/commons/b/b1/Globe_Atlantic.svg" 
		height="400px"/>
		</Pages>
	</Carousel>
</mvc:View>

My Folder path in SAP WebIDE is as under

Please help me to find out the problem.

Accepted Solutions (0)

Answers (1)

Answers (1)

michal_keidar
Active Contributor
0 Kudos

Hi,

Web IDE does not support projects in sub-folders.

Please locate the root folder of your project (i.e. "Week1U21") directly under the "Workspace" root.

Regards,
Michal.

former_member591236
Discoverer
0 Kudos

After setting the project folder directly under the "Wrokspace" and make the necessary changes in the index.html. I still display the black page.

 <!DOCTYPE html >
  <!--Use the xml view from folder view -->
<html>
	<head>
		<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
		<meta charset="UTF-8">
		<title>OpenSAP - Developing Web Apps with SAPUI5</title>
		
		<script
			id="sap-ui-bootstrap"
			src="https://sapui5.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.week1u21": "./"
				}'>
		</script>
		
	<script>
		sap.ui.getCore().attachInit(function () {
			sap.ui.xmlview({
				viewName: "opensap.week1u21.view.app"
			}).placeAt("content");
		});
	</script>
</head>
<body class="sapUiBody" id="content">
</body>
</html>

See the directory structure in SAP WEBIDE as under

CristianBabei
Contributor
0 Kudos

Hi Michal, do you have plans to develop it?

It would be really useful because sometimes you have X projects for different companies and it would be nice to be able to group them in a more comfortable way, I do not know if the Web Ide Full Stack has something similar that can cover this requirement?

It would be like when you create in the SAP Logon the different connections, it allows you to create Sub-folders 🙂

(Do you have any options to send suggestions for improvement about Web Ide? )

michal_keidar
Active Contributor
0 Kudos

Hi Cristian,

There are no plans to support it currently. However your requirement to group projects can be achieved via our support in multiple workspaces. Simply create a workspace per customer (or per whatever you like) and separate your projects.

Regards,
Michal.

michal_keidar
Active Contributor
0 Kudos

Muhammad,

I suggest to create a new app from the "SAPUI5 Application" template, which will create you a UI5 app with an empty view, that is working properly.

Then if you want you can compare this working app to your non-working app and see what has gone wrong.

Regards,
Michal.