cancel
Showing results for 
Search instead for 
Did you mean: 

SAPUI5: Added index.html and fullWidth attribute in manifest.json is now ignored

former_member499177
Participant

Hello gurus,

In the snapshot below you can see the initial layout of an app, run by flpSandbox.

In the 2nd snapshot you can see the same app after I added and called an index.html file which I found in a blog and adjusted

In order to achieve full width I have already added the following statement in manifest.json:

"sap.ui5": { "config": { "fullWidth": true }, etc etc

Seems that the above parameter is ignored when I call the index.html file, so I tried various ways to define it within index.html itself (HTML below) but without success. Any help?

Regards,

Greg

<!DOCTYPE HTML>
<html>
  <head>
	  <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
	  <meta charset="UTF-8">
	  <title>Agreements Maintenance</title>
	  <script id="sap-ui-bootstrap"
		  src="resources/sap-ui-core.js"
		  data-sap-ui-libs="sap.m"
		  data-sap-ui-theme="sap_bluecrystal"
		  data-sap-ui-xx-bindingSyntax="complex"
		  data-sap-ui-resourceroots='{"kristal.apps.agreements": "../webapp/"}'>
	  </script>
	  <link rel="stylesheet" type="text/css" href="css/style.css">
	  <script>
	  sap.ui.getCore().attachInit(function() { 
		    new sap.m.Shell({   
				app: new sap.ui.core.ComponentContainer({
					height : "100%",
					name : "kristal.apps.agreements"
				})
		  }).placeAt("content");
	  });
	  </script>
  </head>
  <body class="sapUiBody" id="content">
  </body>
</html>

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
sap.ui.getCore().attachInit(function(){newsap.m.Shell({   

    appWidthLimited:false,
				app:newsap.ui.core.ComponentContainer({
					height :"100%",name:"kristal.apps.agreements"})}).placeAt("content");});

former_member499177
Participant
0 Kudos

Worked like a charm, thank you

Answers (2)

Answers (2)

draysams
Employee
Employee

As a follow up to jun.wu5 's answer, if you want to do the same in your XML view file, you can specify appWidthLimited:

<Shell id="shell" appWidthLimited="false"> 

To see how it fits in the hierarchy of the entire view file:

<mvc:View 
	xmlns="sap.m"
	controllerName="com.srd.controller.MainView">
	<Shell id="shell" appWidthLimited="false">
	   <App id="app">
              <pages>
                 <Page>
                    <content>

		    </content>
		</Page>
              </pages>
	   </App>
	</Shell>
</mvc:View>

0 Kudos

This is the more elegant solution

boghyon
Product and Topic Expert
Product and Topic Expert
0 Kudos

The fullWidth attribute is evaluated only if the application runs within the SAP Fiori launchpad shell. See https://stackoverflow.com/a/56137602/5846045 for more details.