当前位置: 首页 > news >正文

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

在这一步&#xff0c;我们将会把所有的应用相关的描述性的文件独立放到manifest.json 新建一个manifest.json文件 webapp/manifest.json (New) {"_version": "1.58.0","sap.app": {"id": "ui5.walkthrough","i18n&q…...

打造专属小程序,乔拓云模板平台助力商家抢占先机

打造专属小程序&#xff0c;乔拓云模板平台助力商家抢占先机&#xff01;该平台涵盖全行业小程序模板&#xff0c;一键复制即可上线。 想要快速创建高效实用的小程序&#xff0c;乔拓云小程序模板开发平台为您提供了解决方案&#xff01;我们为您提供一系列精心设计的小程序模板…...

Vue2学习(组件的使用)

Vue中使用组件的三个步骤&#xff1a; 一、定义组件(或者叫创建组件) 使用Vue.extend(options)创建&#xff0c;其中options和new Vue(options)时传入的那个options几乎一样&#xff0c;但也有点区别&#xff1b; 区别如下&#xff1a; 1.el不要写&#xff0c;为什么&#x…...

基于Spring、SpringMVC、MyBatis开发的游乐场管理系统

文章目录 项目介绍主要功能截图:部分代码展示设计总结项目获取方式🍅 作者主页:超级无敌暴龙战士塔塔开 🍅 简介:Java领域优质创作者🏆、 简历模板、学习资料、面试题库【关注我,都给你】 🍅文末获取源码联系🍅 项目介绍 基于Spring、SpringMVC、MyBatis开发的游…...

数据清洗、特征工程和数据可视化、数据挖掘与建模的应用场景

1.5 数据清洗、特征工程和数据可视化、挖掘建模的应用场景 视频为《Python数据科学应用从入门到精通》张甜 杨维忠 清华大学出版社一书的随书赠送视频讲解1.5节内容。本书已正式出版上市&#xff0c;当当、京东、淘宝等平台热销中&#xff0c;搜索书名即可。内容涵盖数据科学应…...

Qt简介、工程文件分离、创建Qt工程、Qt的帮助文档

QT 简介 core&#xff1a;核心模块&#xff0c;非图形的接口类&#xff0c;为其它模块提供支持 gui&#xff1a;图形用户接口&#xff0c;qt5之前 widgets&#xff1a;图形界面相关的类模块 qt5之后的 database&#xff1a;数据库模块 network&#xff1a;网络模块 QT 特性 开…...

机器学习与低代码开发:创新驱动的双剑合璧

引言 随着科技的日新月异&#xff0c;机器学习和低代码开发已经成为引领技术行业变革的两大重要趋势。机器学习通过模拟人类的学习方式&#xff0c;让计算机具备了自我学习和预测的能力&#xff0c;打破了传统计算机程序的局限性。而低代码开发则以简化软件开发过程为目标&…...

企业博客SEO:优化SOP,助您提升搜索引擎可见性

企业博客是互联网时代企业与用户沟通的重要渠道之一&#xff0c;引流成本也比较低。然而&#xff0c;依然有企业会处在3种状态&#xff1a; 1. 有博客&#xff0c;但内容更新不积极或搁置 2. 有博客&#xff0c;但内容散乱 3. 根本就没有博客 如果是这几种状态&#xff0c;…...

[HITCON 2017]SSRFme perl语言的 GET open file 造成rce

这里记录学习一下 perl的open缺陷 这里首先本地测试一下 发现这里使用open打开 的时候 如果通过管道符 就会实现命令执行 然后这里注意的是 perl 中的get 调用了 open的参数 所以其实我们可以通过管道符实现命令执行 然后这里如果file可控那么就继续可以实现命令执行 这里就…...

华为配置Smart Link主备备份示例

定义 Smart Link&#xff0c;又叫做备份链路。一个Smart Link由两个接口组成&#xff0c;其中一个接口作为另一个的备份。Smart Link常用于双上行组网&#xff0c;提供可靠高效的备份和快速的切换机制。 Monitor Link是一种接口联动方案&#xff0c;它通过监控设备的上行接口…...

harmonyOS开发技巧(一)——封装hilog日志

1. 创建sharedLibrary共享hsp包commonLib&#xff1a;功能工具类。 import hilog from ohos.hilog;class Logger {private DOMAIN: number 0x0000;private APP_NAME: string Myapplication;public info(tag: string, ...args: string[]) {hilog.info(this.DOMAIN, [${this.A…...

npm、yarn常用命令

1、设置npm路径 #全局安装路径 npm config set prefix "D:\Program Files\nodejs\node_global" #缓存路径 npm config set cache "D:\Program Files\nodejs\node_cache"2、设置镜像 #1,淘宝镜像源 npm config set registry https://registry.npmmirror.…...

编译和使用WPS-ghrsst-to-intermediate生成SST

一、下载 V1.0 https://github.com/bbrashers/WPS-ghrsst-to-intermediate/tree/masterV1.5&#xff08;使用过程报错&#xff0c;原因不详&#xff0c;能正常使用的麻烦告知一下方法&#xff09; https://github.com/dmitryale/WPS-ghrsst-to-intermediate二、修改makefile…...

通过静态HTTP实现负载均衡

在当今的互联网环境中&#xff0c;随着用户数量的不断增加和业务需求的不断扩大&#xff0c;单台服务器往往无法承受所有的访问压力。为了确保网站的可用性和性能&#xff0c;负载均衡成为了一种常见的解决方案。本文将探讨如何通过静态HTTP实现负载均衡&#xff0c;以提升网站…...

Python开发运维:Python常见异常类型

目录 一、理论 1.异常 一、理论 1.异常 &#xff08;1&#xff09;概念 异常是程序因为某种原因无法正常工作了&#xff0c;比如缩进错误、缺少软件包、环境 错误、连接超时等都会引发异常。 一个健壮的程序应该把所能预知的异常都应做相应的处理&#xff0c;保障程序长期运…...

HarmonyOS学习 第1节 DevEco Studio配置

俗话说的好&#xff0c;工欲善其事,必先利其器。我们先下载官方的开发工具DevEco Studio. 下载完成后&#xff0c;进行安装。 双击DevEco Studio&#xff0c;点击Next按照指引完成安装 重新启动DevEco&#xff0c;点击 Agree 进入环境配置&#xff0c;安装Node.js和ohpm 点击Ne…...

WordPress 注册/重置密码/更改密码钩子

wordpress在提供邮件提醒的地方都留了hook&#xff0c;方便让开发者自定义。最新在添加第三方登录时遇到虚拟邮箱发信问题&#xff0c;为了防止给指定邮件地址后缀发信&#xff0c;可以利用如下wordpress提供的钩子来实现。 //https://www.wwttl.com/101.html //禁止用户注册时…...

LabVIEW开发远程结构健康监测系统

LabVIEW开发远程结构健康监测系统 工程师依赖于振动监测来评估建筑物、桥梁和其他大型结构的完整性。传统的振动监测工具在数据收集上存在限制&#xff0c;无法长时间收集高保真波形。随着内存存储、处理器速度和宽带无线通信技术的进步&#xff0c;出现了对能够长时间收集并实…...

多段图问题-动态规划解法

一、多段图问题 问题描述&#xff1a;设图G(V, E)是一个带权有向图&#xff0c;如果把顶点集合V划分成k个互不相交的子集Vi (2≤k≤n, 1≤i≤k)&#xff0c;使得对于E中的任何一条边(u, v)&#xff0c;必有u∈Vi&#xff0c;v∈Vim (1≤i≤k, 1&#xff1c;im≤k)&#xff0c;…...

Android实验:绑定service实验

目录 实验目的实验内容实验要求项目结构代码实现代码解释结果展示 实验目的 充分理解Service的作用&#xff0c;与Activity之间的区别&#xff0c;掌握Service的生命周期以及对应函数&#xff0c;了解Service的主线程性质&#xff1b;掌握主线程的界面刷新的设计原则&#xff…...

道心网络安全学习笔记系列之好靶场的信息收集2

上节课找了一个图片的网址&#xff0c;继续挑战其它靶场&#xff0c;我们看下一题收集十个百度域名&#xff0c;这还不是顺手就来&#xff0c;但是贴吧不行&#xff0c;那还不简单&#xff0c;去访问百度网站&#xff0c;顺便输入一个搜索词&#xff0c;都不用看&#xff0c;前…...

新手必看!用PHPStudy一键搭建DVWA靶场(附常见错误解决)

零基础实战&#xff1a;用PHPStudy快速搭建DVWA漏洞靶场全指南 第一次接触网络安全实战时&#xff0c;很多人会被复杂的实验环境搭建劝退。作为过来人&#xff0c;我完全理解那种面对满屏报错信息的无力感。本文将手把手带你用PHPStudy这个神器&#xff0c;在Windows系统上快速…...

YOLOv8改进之TransformerHead:将检测头替换为轻量级Transformer预测层,捕捉全局上下文

摘要 在目标检测任务中,YOLOv8凭借其高效的架构和优异的性能表现,已成为工业界和学术界广泛应用的基准模型。然而,YOLOv8传统检测头基于卷积神经网络设计,虽能有效提取局部特征,但在建模全局上下文关系和长程依赖方面存在天然局限。针对这一问题,本文提出了一种创新的改…...

Typora式优雅写作体验:基于PyTorch模型的智能Markdown内容助手

Typora式优雅写作体验&#xff1a;基于PyTorch模型的智能Markdown内容助手 1. 重新定义写作工具 想象一下这样的场景&#xff1a;你正在用Markdown写一篇技术文档&#xff0c;刚敲下几个关键词&#xff0c;编辑器就自动补全了整个段落&#xff1b;当你纠结某个表达是否恰当时…...

EcomGPT-中英文-7B电商模型与数据库课程设计:构建智能电商问答知识库

EcomGPT-中英文-7B电商模型与数据库课程设计&#xff1a;构建智能电商问答知识库 电商平台每天要处理海量的用户咨询&#xff1a;“这件衣服有M码吗&#xff1f;”、“这个手机和昨天看的那个有什么区别&#xff1f;”、“帮我推荐几款适合送长辈的茶叶”。传统客服要么忙不过…...

深入 Spring 源码,剖析设计模式的落地实践

写在文章开头 阅读源码是理解框架最有效的方式之一,Spring 源码中蕴含了大量设计模式的经典应用。本文将从源码层面深入剖析这些设计模式,带你理解框架设计精髓,掌握在实际项目中灵活运用的能力。 你好,我是 SharkChili ,Java Guide 核心维护者之一,对 Redis、Nighting…...

OpenClaw+Qwen3-32B双镜像方案:AI写作与发布自动化流水线

OpenClawQwen3-32B双镜像方案&#xff1a;AI写作与发布自动化流水线 1. 为什么需要双镜像协作&#xff1f; 去年冬天&#xff0c;当我第一次尝试用AI自动化完成技术博客的写作和发布时&#xff0c;遇到了一个典型困境&#xff1a;本地模型响应快但质量一般&#xff0c;云端大…...

保姆级避坑指南:用Python预测波士顿房价,你的MSE为什么降不下来?

Python实战&#xff1a;波士顿房价预测模型MSE居高不下的7个关键排查点 当你第一次尝试用线性回归预测波士顿房价时&#xff0c;最令人沮丧的莫过于看着训练损失曲线反复横跳&#xff0c;而测试集的MSE&#xff08;均方误差&#xff09;却像被钉在墙上的蝴蝶标本一样纹丝不动。…...

一键解决中文文献管理痛点:茉莉花插件让Zotero效率提升90%的完整指南

一键解决中文文献管理痛点&#xff1a;茉莉花插件让Zotero效率提升90%的完整指南 【免费下载链接】jasminum A Zotero add-on to retrive CNKI meta data. 一个简单的Zotero 插件&#xff0c;用于识别中文元数据 项目地址: https://gitcode.com/gh_mirrors/ja/jasminum …...

Wireshark 实战|HTTP 协议:浏览器和服务器是怎么聊天的?

Wireshark 实战&#xff5c;HTTP 协议&#xff1a;浏览器和服务器是怎么聊天的&#xff1f; 大家好&#xff0c;我是网域小星球&#xff0c;一名网络工程大三学生。上一篇我们拆解了 DNS 域名解析&#xff0c;今天我们继续往下走&#xff0c;看看拿到 IP 地址后&#xff0c;浏…...