cancel
Showing results for 
Search instead for 
Did you mean: 

Custom SAPUI5 app. on launchpad fullscreen

Former Member
0 Kudos

If one has created a custom SAPUI5 application that points / uses src="https://sapui5.hana.ondemand.com/1.38.8/resources/sap-ui-core.js"

but has an older embedded Gateway server on their sandbox. Would that prevent them from using fullscreen: true in their Component.js? I've got the launchpad "Additional Information" at SAPUI5.Component and my application works with the lauchoad but I can't get it to be fullscreen? Any ideas?

I've read that the FES must match the BES?

Accepted Solutions (1)

Accepted Solutions (1)

junwu
Active Contributor
0 Kudos

launch pad only needs the component js to start your app. html has no place in this case.

Answers (4)

Answers (4)

kammaje_cis
Active Contributor
0 Kudos

Where are you providing this <script> tag. For a Fiori application, you do not provide an index file, so there is no place to mention a script tag.

Are you running you application standalone?

Former Member
0 Kudos

Here's my component.js file and my index file. That calls my Component.js This was a standalone app. that I now want in the Launchpad.

So you're saying forget the index file and just use the Component.js? If I rename my index.html to .2index.html it still does the same.

Here's my Component.js

jQuery.sap.declare("ZCW_SNAP_BILLNG.Component");
sap.ui.core.UIComponent.extend("ZCW_SNAP_BILLNG.Component", {

metadata : {
config : {
fullWidth : true
}
},

createContent: function(){

var oI18nModel, ui5core;
ui5core = sap.ui.getCore();
var slang = "fr";
slang = "en";
oI18nModel = new sap.ui.model.resource.ResourceModel({bundleUrl:"i18n/messages.properties", bundleLocale:slang});
sap.ui.getCore().setModel(oI18nModel, "i18n");
ui5core.setModel(oI18nModel, "i18n");
var oResourceBundle = oI18nModel.getResourceBundle();

var oView = sap.ui.view({id:"idMain1", viewName:"ZCW_SNAP_BILLNG.snap.modules.Bill", type:sap.ui.core.mvc.ViewType.JS});

oView.setModel(oI18nModel, "i18n");
return oView;
}

});

Here's my index.html file.

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv='Content-Type' content='text/html;charset=UTF-8'/>
<title>Curtiss Wright SNAP Application</title>

<script id="sap-ui-bootstrap" src="./resources/sap-ui-core.js"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-libs="sap.ui.commons, sap.ui.table, sap.m"
data-sap-ui-xx-bindingSyntax="complex"
data-sap-ui-resourceroots='{ "ZCW_SNAP_BILLNG": "./" }' >
</script>

<style type="text/css">
.Total {
background-color: LightGrey !important;
}
.green {
background-color: LightGreen !important;
}
.red {
background-color: OrangeRed !important;
}
.yellow {
background-color: Khaki !important;
}
</style>

<style type="text/css">
.hdr1 {
padding: 1;
height: 2rem;
background-color: Khaki !important;
}
.hdr {
padding: 0;
height: 0rem;
}
.hdr3 {
padding: 1;
height: 2rem;
background-color: LightSlateGray !important;
}
.hdr4
{
border-right: 1px solid black;
}
</style>

<script>
sap.ui.localResources("snap");
</script>

<script>
(function(){
//"use strict";
//register modules paths
jQuery.sap.registerModulePath("util", "./snap/js/lib/util/"); //our own libs
jQuery.sap.registerModulePath("modules", "./snap/modules/"); //controllers and views
jQuery.sap.require("util.app");
})();
</script>

<script>
sap.ui.getCore().attachInit(function() {
new sap.m.Shell({
app: new sap.ui.core.ComponentContainer({
height : "100%",
name : "ZCW_SNAP_BILLNG"
})
}).placeAt("content");
});
</script>

</head>
<body class="sapUiBody" id="content">
</body>
</html>

kammaje_cis
Active Contributor
0 Kudos

Right. So forget index file and concentrate on Component file. As I see you have used the right parameter.

Now what I am doubting is that you might be using a shell as your container, and you might have manually set the width to less than 100%. Check your view code.

Former Member
0 Kudos

Thanks Krishna, I got it to work once I stripped it down to just the Component.js, view and the controller.

Former Member
0 Kudos

I forgot to mention we're at 1.18.1xx

Former Member
0 Kudos

OK, so I changed my app. to reflect my own resources; it's now

<script id="sap-ui-bootstrap" src="./resources/sap-ui-core.js"

I have sap.ui.core.UIComponent.extend("ZCW_SNAP_BILLNG.Component" in my Component.js I also have a blank Component-preload.js and in my lpd_cust for my application "Additional Information" I have SAPUI5.Component=ZCW_SNAP_BILLNG and I still cannot get full screen. If I go to SAP.Component=ZCW_SNAP_BILLNG my app. loads but not in full screen. Any other ideas?

Thanks!

junwu
Active Contributor
0 Kudos

you have no chance to specify the ui5 version if you run your app through launchpad.

Former Member
0 Kudos

OK, so I changed my app. to reflect my own resources; it's now

<script id="sap-ui-bootstrap" src="./resources/sap-ui-core.js"

I have sap.ui.core.UIComponent.extend("ZCW_SNAP_BILLNG.Component" in my Component.js I also have a blank Component-preload.js and in my lpd_cust for my application "Additional Information" I have SAPUI5.Component=ZCW_SNAP_BILLNG and I still cannot get full screen. If I go to SAP.Component=ZCW_SNAP_BILLNG my app. loads but not in full screen. Any other ideas?

we're at 1.18.1xx

Thanks!