SAP UI5 walkthrough step10 Descriptor for Applications

2023-12-10 00:01

本文主要是介绍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.

这篇关于SAP UI5 walkthrough step10 Descriptor for Applications的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/475480

相关文章

Usb Audio Device Descriptor(10) Hid Device

对于 Standard Interface Descriptor, 当 bInterfaceClass=0x03时,即为HID设备。Standard Interface Descriptor如下 struct usb_standard_interface_descriptor{U8 bLength; /*Size of this descriptor in bytes*/U8 bDescrip

SAP学习笔记 - 开发02 - BTP实操流程(账号注册,BTP控制台,BTP集成开发环境搭建)

上一章讲了 BAPI的概念,以及如何调用SAP里面的既存BAPI。 SAP学习笔记 - 开发01 - BAPI是什么?通过界面和ABAP代码来调用BAPI-CSDN博客 本章继续讲开发相关的内容,主要就是BTP的实际操作流程,比如账号注册,登录,BTP集成开发环境的搭建这方面。 目录 1,账号注册 2,BTP登录URL 3,如何在BTP上进行开发? 以下是详细内容。 1,账

SAP项目中沟通的几点总结

最近参与的公司SAP RISE项目,由于是国际项目,全程远程实施,所以沟通显得尤为重要,有几点总结跟大家分享。   1.     提前沟通 提前沟通比事后沟通效果好太多。作为项目管理者,需要把下一步的计划等信息提前通过一定的形式(会议、邮件、Teams Channel等)传播出去。而不是等着这个事情发生了,项目组成员来询问,一方面这样很浪费时间,也会对项目进队产生影响,所以作为项目管理者永

SMIDI-SAP接口配置手册

目录 一、 SAPERP相关接口配置(必要条件) 1. SAP ERP 配置 1.1 配置

SAP HCM 如何计算缺勤实数

导读 INTRODUCTION 缺勤实数:这几天好几个朋友问题有什么办法可以计算出缺勤的时长,因为计算时长需要和排班去匹配,所以逻辑复杂度还是比较高的,希望有标准的函数能完成。其实SAP有个标准的函数可以完成,复杂的时候填充的参数特别多,所以今天介绍一个函数PA30保存2001的时候会调用,这样可以知道标准参数需要填充什么值。 作者:vivi,来源:osinnovation。 一、具体函数

SAP MM模块与FI模块集成之科目配置

1. 定义评估范围 OMWD   评估范围设置在工厂层,那么系统自动建立和工厂具有相同ID的评估范围 IMG:物料管理>评估和科目设置>科目确定>无向导的科目确定>将评估范围群集分组 提示:评估层级——评估分组代码——评估范围。 2. OBYC-BSX(存货科目) IMG:物料管理->评估和科目设置->科目确定->无向导的科目确定->配置自动记帐 双击BSX,输入科目表。

SAP MPS (主生产计划) 与 MRP (物料需求计划) 简介

SAP MPS 主生产计划 与 MRP 物料需求计划 简介 SAP 主生产计划 (MPS):SAP 物料需求计划 (MRP):MPS 与 MRP 的区别:业务场景前台操作演示1、物料主数据准备2、创建销售订单---VA013、运行MPS---MD404、查看物料需求---MD045、运行MRP---MD026、查看需求---MD047、总结 SAP 主生产计划 (MPS): M

FFmpeg源码:avcodec_descriptor_get函数分析

一、avcodec_descriptor_get函数的声明 avcodec_descriptor_get函数声明在FFmpeg源码(本文演示用的FFmpeg源码版本为7.0.1)的头文件libavcodec/codec_desc.h中: /*** @return descriptor for given codec ID or NULL if no descriptor exists.*/c

SAP 快速输入

进入SM30,输入TPARA  确定   会生成CR号 之后再重新保存,反复确认下。 程序里加上MEMORY ID PARAMETERS pname_1 LIKE suid_st_bname-bname MEMORY ID zpname1 . "签核PARAMETERS pname_2 LIKE suid_st_bname-bname MEMORY ID zpname2

SAP CN22释放物料的可用性的操作方法

SAP PS系统,CN22要释放网络的可用性(直发物料号的需求), 必输要操作路径正确,或者操作的界面正确,否则保存后无法释放可用性。 先进入作业一览 然后进入作业的组件,对网络赋值的界面, 然后选中组建,再使用可用性-复位 然后保存即可。 只有在这个网络,对作业赋值的界面操作,才能释放可用性分配。 其他情况下,均不会生效。