使用nodejs将SAP Fiori应用置于本地Launchpad运行
In the blog Step by step to run your Fiori application locally on NodeJS the steps to run your Fiori application locally by using NodeJS as server are introduced. In that solution, the Fiori application is launched in a standalone mode where sap.ushell.Container is not available. Additionally there is a requirement to put Fiori application to local launchpad as sandbox for unit test purpose.
Final archievement is: you can see a tile for your Fiori project in the local launchpad. Once tile is clicked, you can see your Fiori application in the local shell.
The major required six steps are logically the same as previous blog.
Step 1 ~ Step4: exactly the same as steps in previous blog. Step 5: the only needed modification on Gruntfile.js is, you should launch a new html page which creates a local launchpad.
Step 6: Create another html page Sandbox.html.
Key points
(1) declare a dummy render and the navigation target application information when a tile is clicked.
(2) Include sandbox.js :
(3) In Sandbox.html, instead of using ComponentContainer, now we should create the configured renderer using API sap.ushell.Container.createRenderer to leverage on local launchpad instead. The complete source code of my Sandbox.html for your reference:
<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Jerry's test Fiori application</title>
<script>
window["sap-ushell-config"] = {
defaultRenderer : "fiori2",
renderers: {
fiori2: {
componentData: {
config: {
search: "hidden"
}
}
}
},
applications: {
"jerrytestfiori-display": {
additionalInformation: "SAPUI5.Component=JerryTest",
applicationType: "URL",
url: "./",
title: "Jerry test Fiori application"
}
}
};
</script>
<script src="https://sapui5.hana.ondemand.com/test-resources/sap/ushell/bootstrap/sandbox.js" id="sap-ushell-bootstrap"></script>
<script src="/resources/sap-ui-core.js"
id="sap-ui-bootstrap"
data-sap-ui-libs="sap.m, sap.ushell, sap.ui.comp"
data-sap-ui-theme="sap_bluecrystal"
data-sap-ui-xx-bindingSyntax="complex">
</script>
<script>
sap.ui.getCore().attachInit(function() {
sap.ushell.Container.createRenderer().placeAt("content");
});
</script>
</head>
<body class="sapUiBody" role="application">
<div id="content"></div>
</body>
</html>
In the runtime, once the tile is clicked, my Fiori application is opened:
The creation of configured render “fiori2” could be debugged from here:
- JavaScript 教程
- JavaScript 编辑工具
- JavaScript 与HTML
- JavaScript 与Java
- JavaScript 数据结构
- JavaScript 基本数据类型
- JavaScript 特殊数据类型
- JavaScript 运算符
- JavaScript typeof 运算符
- JavaScript 表达式
- JavaScript 类型转换
- JavaScript 基本语法
- JavaScript 注释
- Javascript 基本处理流程
- Javascript 选择结构
- Javascript if 语句
- Javascript if 语句的嵌套
- Javascript switch 语句
- Javascript 循环结构
- Javascript 循环结构实例
- Javascript 跳转语句
- Javascript 控制语句总结
- Javascript 函数介绍
- Javascript 函数的定义
- Javascript 函数调用
- Javascript 几种特殊的函数
- JavaScript 内置函数简介
- Javascript eval() 函数
- Javascript isFinite() 函数
- Javascript isNaN() 函数
- parseInt() 与 parseFloat()
- escape() 与 unescape()
- Javascript 字符串介绍
- Javascript length属性
- javascript 字符串函数
- Javascript 日期对象简介
- Javascript 日期对象用途
- Date 对象属性和方法
- Javascript 数组是什么
- Javascript 创建数组
- Javascript 数组赋值与取值
- Javascript 数组属性和方法
- 012.Nginx负载均衡
- 013.Nginx动静分离
- 014.Nginx跨域配置
- 深入理解 FilterChainProxy【源码篇】
- matplotlib基础绘图命令之bar
- 使用 Github Actions 自动部署 Angular 应用到 Github Pages
- 路径中关于斜杠/和反斜杠 的区别
- Redis的高级特性与应用场景(二)
- Redis的高级特性与应用场景(一)
- 022.基于IT论坛案例学习Elasticsearch(一):Filter相关知识
- 耐人寻味的逻辑错误
- 实践搭建Sentry异常中心结合Laravel使用
- 自动化部署 - Laravel Deploy实战
- 正则表达式 | 锚点
- adb shell读取设置手机ocd值以及ocd介绍