SAP UI5 walkthrough step10 Descriptor for Applications

在这一步,我们将会把所有的应用相关的描述性的文件独立放到manifest.json

新建一个manifest.json文件

webapp/manifest.json (New)

{"_version": "1.58.0","sap.app": {"id": "ui5.walkthrough","i18n": "i18n/i18n.properties","title": "{{appTitle}}","description": "{{appDescription}}","type": "application","applicationVersion": {"version": "1.0.0"}},"sap.ui": {"technology": "UI5","deviceTypes": {"desktop": true,"tablet": true,"phone": true}},"sap.ui5": {"dependencies": {"minUI5Version": "1.108.0","libs": {"sap.ui.core": {},"sap.m": {}}},"models": {"i18n": {"type": "sap.ui.model.resource.ResourceModel","settings": {"bundleName": "ui5.walkthrough.i18n.i18n","supportedLocales": [""],"fallbackLocale": ""}}},"rootView": {"viewName": "ui5.walkthrough.view.App","type": "XML","id": "app"}}
}
  • The sap.app namespace contains the following application-specific attributes:

    • id (mandatory): The namespace of our application component.

      The ID must not exceed 70 characters. It must be unique and must correspond to the component ID/namespace.

    • type: Defines what we want to configure; here: an application.

    • i18n: Defines the path to the resource bundle file. The supportedLocales and fallbackLocale properties are set to empty strings, as our demo app uses only one i18n.properties file for simplicity and we'd like to prevent the browser from trying to load additional i18n_*.properties files based on your browser settings and your locale.

    • title: Title of the application in handlebars syntax referenced from the app's resource bundle.

    • description: Short description text what the application does in handlebars syntax referenced from the app's resource bundle.

    • applicationVersion: The version of the application to be able to update the application easily later on.

  • sap.ui

    The sap.ui namespace contributes the following UI-specific attributes:

    • technology: This value specifies the UI technology; in our case we use SAPUI5

    • deviceTypes: Tells what devices are supported by the app: desktop, tablet, phone (all true by default)

  • sap.ui5

    The sap.ui5 namespace adds SAPUI5-specific configuration parameters that are automatically processed by SAPUI5. The most important parameters are:

    • rootView: If you specify this parameter, the component will automatically instantiate the view and use it as the root for this component

    • dependencies: Here we declare the UI libraries used in the application

    • models: In this section of the descriptor we can define models that will be automatically instantiated by SAPUI5 when the app starts. Here we can now define the local resource bundle. We define the name of the model "i18n" as key and specify the bundle file by namespace. As in the previous steps, the file with our translated texts is stored in the i18n folder and named i18n.properties. We simply prefix the path to the file with the namespace of our app. The manual instantiation in the app component's init method will be removed later in this step. The supportedLocales and fallbackLocale properties are set to empty strings, as in this tutorial our demo app uses only one i18n.properties file for simplicity, and we'd like to prevent the browser from trying to load additional i18n_*.properties files based on your browser settings and your locale.

    For compatibility reasons the root object and each of the sections state the descriptor version number 1.58.0 under the internal property _version. Features might be added or changed in future versions of the descriptor and the version number helps to identify the application settings by tools that read the descriptor.

修改index.html

<!DOCTYPE html>
<html>
<head><meta charset="utf-8"><title>UI5 Walkthrough</title><scriptid="sap-ui-bootstrap"src="resources/sap-ui-core.js"data-sap-ui-theme="sap_horizon"data-sap-ui-compatVersion="edge"data-sap-ui-async="true"data-sap-ui-oninit="module:sap/ui/core/ComponentSupport"data-sap-ui-resourceroots='{"ui5.walkthrough": "./"}'></script>
</head>
<body class="sapUiBody" id="content"><div data-sap-ui-component data-name="ui5.walkthrough" data-id="container" data-settings='{"id" : "walkthrough"}'></div>
</body>
</html>

修改i18n

webapp/i18n/i18n.properties

# App Descriptor
appTitle=Hello World
appDescription=A simple walkthrough app that explains the most important concepts of SAPUI5# Hello Panel
showHelloButtonText=Say Hello
helloMsg=Hello {0}

修改component 

webapp/Component.js

sap.ui.define(["sap/ui/core/UIComponent","sap/ui/model/json/JSONModel"
], (UIComponent, JSONModel) => {"use strict";return UIComponent.extend("ui5.walkthrough.Component", {metadata : {interfaces: ["sap.ui.core.IAsyncContentCreation"],manifest: "json"},init() {// call the init function of the parentUIComponent.prototype.init.apply(this, arguments);// set data modelconst oData = {recipient : {name : "World"}};const oModel = new JSONModel(oData);this.setModel(oModel);}});
});

Conventions

  • The descriptor file is named manifest.json and located in the webapp folder.

  • Use translatable strings for the title and the description of the app.

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/209592.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

【已解决】No module named ‘sklearn‘

问题描述 No module named ‘sklearn‘ 解决办法 pip install scikit-learn 完结撒花 契约、包容、感恩、原则……这些成年人该有的基本精神&#xff0c;为什么我在他们身上找不到呢&#xff1f;

图像叠加中文字体

目录 1) 前言2) freetype下载3) Demo3.1) 下载3.2) 编译3.3) 运行3.4) 结果3.5) 更详细的使用见目录中说明 4) 积少成多 1) 前言 最近在做图片、视频叠加文字&#xff0c;要求支持中文&#xff0c;基本原理是将图片或视频解码后叠加文字&#xff0c;之后做图片或视频编码即可。…

ASP.NET Core概述-微软已经收购了mono,为什么还搞.NET Core呢

一、.NET Core概述 1、相关历程 .NET在设计之初也是考虑像Java一样跨平台&#xff0c;.NET Framework是在Windows下运行的&#xff0c;大部分类是可以兼容移植到Linux下&#xff0c;但是没有人做这个工作。 2001年米格尔为Gnome寻找桌面开发技术&#xff0c;在研究了微软的.…

数据库版本管理框架-Flyway(从入门到精通)

一、flyway简介 Flyway是一个简单开源数据库版本控制器&#xff08;约定大于配置&#xff09;&#xff0c;主要提供migrate、clean、info、validate、baseline、repair等命令。它支持SQL&#xff08;PL/SQL、T-SQL&#xff09;方式和Java方式&#xff0c;支持命令行客户端等&am…

TCP对数据的拆分

应用程序的数据一般都比较大&#xff0c;因此TCP会按照网络包的大小对数据进行拆分。 当发送缓冲区中的数据超过MSS的长度&#xff0c;数据会被以MSS长度为单位进行拆分&#xff0c;拆分出来的数据块被放进单独的网路包中。 根据发送缓冲区中的数据拆分情况&#xff0c;当判断…

ffmpeg编译问题

利用ffmpeg实现一个播放器&#xff0c;ffmpeg提供动态库&#xff0c;但是编译链接的时候遇到下面的问题&#xff1a; ../ffmpegWidgetPlayer/videoplayerwidget.cpp:23: error: undefined reference to sws_freeContext(SwsContext*) ../ffmpegWidgetPlayer/videoplayerwidget.…

JWT介绍及演示

JWT 介绍 cookie(放在浏览器) cookie 是一个非常具体的东西&#xff0c;指的就是浏览器里面能永久存储的一种数据&#xff0c;仅仅是浏览器实现的一种数据存储功能。 cookie由服务器生成&#xff0c;发送给浏览器&#xff0c;浏览器把cookie以kv形式保存到某个目录下的文本…

JavaScript 金额元转化为万

function dealNum(price){if (price 0) {return 0元}const BASE 10000const decimal 0const SIZES ["", "万", "亿", "万亿"];let i undefined;let str "";if (price) {if ((price > 0 && price < BASE…

p标签的水平居中和垂直居中

1行内块元素水平居中垂直居中 行内元素和行内块元素水平居中&#xff0c;给其父元素添加text-align:center&#xff1b;所以案例里面给one加了 text-align: center之后span就会水平居中了。在设置span行高和高都是一样的 20px;这样就实现上下居中了。 2块级元素P元素水平居中…

通过命令行输入参数控制激励

1)在命令行的仿真参数&#xff08;SIM_OPT&#xff09;加上&#xff1a;“var_a100 var_b99” 2)在环境中调用&#xff1a; $test$plusargs("var_a")&#xff1b;如果命令行存在这个字符&#xff0c;返回1&#xff0c;否则返回0&#xff1b; $value$plusargs(&qu…

vue2 el-input里实现打字机 效果

vue2 el-input里实现打字机 效果 <el-col :span"24" v-if"ifshowOtherDesc""><el-form-item label"分析" prop"otherDesc"><el-input type"textarea" :disabled"disabled" autofocus"t…

蓝牙物联网对接技术难点有哪些?

#物联网# 蓝牙物联网对接技术难点主要包括以下几个方面&#xff1a; 1、设备兼容性&#xff1a;蓝牙技术有多种版本和规格&#xff0c;如蓝牙4.0、蓝牙5.0等&#xff0c;不同版本之间的兼容性可能存在问题。同时&#xff0c;不同厂商生产的蓝牙设备也可能存在兼容性问题。 2、…

0-1背包问题

二维版: import java.io.BufferedReader; import java.io.IOException; import java.io.InputStreamReader;public class Main {static int N 1010;static int[][] dp new int[N][N]; //dp[i][j] 只选前i件物品,体积 < j的最优解static int[] w new int[N]; //存储价…

Day03 嵌入式---中断

目录 一、简单介绍 二、总体框架 三、NVIC 3.2 NVIC的寄存器 3.3 中断向量表 3.4 中断优先级 3.5 NVIC优先级分组 3.6 NVIC配置 3.6.1、设置中断分组 3.6.2、初始化 四、EXTI 外部中断 4.1.EXTI的基本概念 4.2.EXTI的⼯作原理 4.3 EXTI配置 五、SYSCFG 5.1 SYS…

字符串函数`strlen`、`strcpy`、`strcmp`、`strstr`、`strcat`的使用以及模拟实现

文章目录 &#x1f680;前言&#x1f680;库函数strlen✈️strlen的模拟实现 &#x1f680;库函数strcpy✈️strcpy的模拟实现 &#x1f680;strcmp✈️strcmp的模拟实现 &#x1f680;strstr✈️strstr的模拟实现 &#x1f680;strcat✈️strcat的模拟实现 &#x1f680;前言 …

ReactJS和VueJS的简介以及它们之间的区别

本文主要介绍ReactJS和VueJS的简介以及它们之间的区别。 目录 ReactJS简介ReactJS的优缺点ReactJS的应用场景VueJS简介VueJS的优缺点VueJS的应用场景ReactJS和VueJS的区别 ReactJS简介 ReactJS是一个由Facebook开发的基于JavaScript的前端框架。它是一个用于构建用户界面的库&…

【C语言】——函数递归,用递归简化并实现复杂问题

文章目录 前言一、什么是递归二、递归的限制条件三、递归举例1.求n的阶乘2. 举例2&#xff1a;顺序打印一个整数的每一位 四、递归的优劣总结 前言 不多废话了&#xff0c;直接开始。 一、什么是递归 递归是学习C语言函数绕不开的⼀个话题&#xff0c;那什么是递归呢&#xf…

电商平台商品销量API接口,30天销量API接口接口超详细接入方案说明

电商平台商品销量API接口的作用主要是帮助开发者获取电商平台上的商品销量信息。通过这个接口&#xff0c;开发者可以在自己的应用或网站中实时获取商品的销量数据&#xff0c;以便进行销售分析、库存管理、市场预测等操作。 具体来说&#xff0c;电商平台商品销量API接口的使…

RocketMq集成SpringBoot(待完善)

环境 jdk1.8, springboot2.7.3 Maven依赖 <parent><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter-parent</artifactId><version>2.7.3</version><relativePath/> <!-- lookup parent from…

vue3 笔记 - 声明式 一

官网&#xff1a;Vue.js - 渐进式 JavaScript 框架 | Vue.js vue3编写有声明式和响应式。该文章仅记录声明式。vue3声明式与vue2相同。 一、生命周期 创建之前 beforeCreate()已创建 created()挂载之前 beforeMount()已挂载 mounted()销毁之前 beforeUnmount()已销毁 unmoun…