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.pswp.cn/news/209592.shtml
繁體地址,請注明出處:http://hk.pswp.cn/news/209592.shtml
英文地址,請注明出處:http://en.pswp.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…