SAP UI5 complex parser 只有在 1.26 版本之后才能使用

简介: SAP UI5 complex parser 只有在 1.26 版本之后才能使用

下面是一个例子:


语义是,complex Parser 功能,只能在 1.26 及其之后的版本使用:

if ( config["bindingSyntax"] === "default" ) {
    config["bindingSyntax"] = (config.getCompatibilityVersion("sapCoreBindingSyntax").compareTo("1.26") < 0) ? "simple" : "complex";
    }

04ae3d8ab8fb854023d62b4d383aa2b2_335839909bc323740c14a3c400301116.png


版本号是 1.26:

解析出主版本号为1,次版本号为 26:

当前次版本号是 110:


当前 SAP UI5 版本的次版本号是怎么求出来的?

SAP UI5 默认的 jQuery 版本是 3.6.0,如果不是这个版本,在 console 会打印警告消息。


Add all defined events to the event infrastructure


jQuery has inversed the order of event registration when multiple events are passed into jQuery.on method from version 1.9.1.


UIArea binds to both touchstart and saptouchstart event and saptouchstart internally also binds to touchstart event.


Before jQuery version 1.9.1, the touchstart event handler is called before the saptouchstart event handler and our flags (e.g. _sapui_handledByUIArea) still work. However since the order of event registration is inversed from jQuery version 1.9.1, the saptouchstart event handler is called before the touchstart one, our flags don’t work anymore.


Therefore jQuery version needs to be checked in order to decide the event order in ControlEvents.events.


将所有定义的事件添加到事件基础结构


从 1.9.1 版本开始,当多个事件被传递到 jQuery.on 方法时,jQuery 已经颠倒了事件注册的顺序。


UIArea 绑定到 touchstart 和 saptouchstart 事件,saptouchstart 在内部也绑定到 touchstart 事件。


在 jQuery 版本 1.9.1 之前,touchstart 事件处理程序在 saptouchstart 事件处理程序之前被调用,我们的标志(例如 _sapui_handledByUIArea)仍然有效。 然而,由于事件注册的顺序与 jQuery 1.9.1 版相反,saptouchstart 事件处理程序在 touchstart 事件处理程序之前被调用,我们的标志不再起作用。


因此需要检查 jQuery 版本以确定 ControlEvents.events 中的事件顺序。


这就是上图代码检查的用途所在。

默认的 compatVersion 值为 edge


默认的 SAP UI5 base version 为 1.14:


每个版本的 SAP UI5 SDK 文件,在 configuration.js 文件里硬编码了当前版本:


即在调试模式下 Technical Information Dialog 对话框里看到的:


相关文章
|
4月前
|
前端开发 搜索推荐 开发者
SAP UI5 sap.m.Column 控件的 minScreenWidth 属性介绍
SAP UI5 sap.m.Column 控件的 minScreenWidth 属性介绍
|
4月前
|
JavaScript 前端开发 开发者
SAP UI5 控件 sap.m.ListBase 的 inset 属性的作用介绍
SAP UI5 控件 sap.m.ListBase 的 inset 属性的作用介绍
|
4月前
|
Web App开发 数据采集 前端开发
纯技术讨论:如何让 SAP UI5 应用无法被别人在浏览器里调试 - 这种做法不推荐试读版
纯技术讨论:如何让 SAP UI5 应用无法被别人在浏览器里调试 - 这种做法不推荐试读版
|
4月前
|
XML 存储 数据格式
SAP UI5 控件 customData 属性的应用介绍
SAP UI5 控件 customData 属性的应用介绍
|
4月前
|
前端开发 JavaScript API
SAP UI5 sap.ui.require.toUrl 的作用介绍
SAP UI5 sap.ui.require.toUrl 的作用介绍
|
4月前
|
搜索推荐
如何让 SAP UI5 Smart Table 支持多项选择(Multiple-Selection)试读版
如何让 SAP UI5 Smart Table 支持多项选择(Multiple-Selection)试读版
使用 SAP UI5 Event Bus 机制,修复 SAP UI5 分页显示数据的一个 bug 试读版
使用 SAP UI5 Event Bus 机制,修复 SAP UI5 分页显示数据的一个 bug 试读版
|
4月前
|
Web App开发 前端开发 JavaScript
乱花渐欲迷人眼 - 让 SAP UI5 应用的日志输出不再素面朝天
乱花渐欲迷人眼 - 让 SAP UI5 应用的日志输出不再素面朝天
|
4月前
|
Web App开发 JSON JavaScript
SAP UI5 应用程序小技巧 - 一键将 JSON 对象导出成本地 json 文件
SAP UI5 应用程序小技巧 - 一键将 JSON 对象导出成本地 json 文件
|
4月前
|
XML 数据处理 数据格式
什么是 SAP UI5 XML Templating 技术
什么是 SAP UI5 XML Templating 技术

热门文章

最新文章