当前位置:网站首页>关于 SAP UI5 参数 $$updateGroupId 前面两个 $ 符号的含义
关于 SAP UI5 参数 $$updateGroupId 前面两个 $ 符号的含义
2022-06-27 14:24:00 【Jerry Wang】
我的 SAP UI5 教程,SAP UI5 应用开发教程之六十五 - 基于 OData V4 的 SAP UI5 表格控件如何实现创建,编辑和保存功能,里面演示了通过 XML 视图的方式,非 SAP UI5 Table 控件,定义复合绑定路径的语法,如下图所示:
<Table
id="peopleList"
growing="true"
growingThreshold="10"
items="{
path: '/People',
parameters: {
$count: true,
$$updateGroupId : 'peopleGroup'
}
}">这行语句的语义是:当用户修改(update)表格行项目时,表格控件不会立即将这些修改,通过 HTTP Post 请求的方式发送到提供 OData 服务的 Mock Server,而是延迟到当用户点击工具栏的 Save 按钮时才发送 HTTP Post Batch 请求,进行修改的保存。peopleGroup 是 Batch 请求的 group 编号,可以在 Chrome 开发者工具里观察到:
有朋友对于 XML 视图里的参数 $$updateGroupId 提出这样的疑问:
这个updateGroupId前面是两个
,这个含义能给解释一下吗?啥时候是一个,啥时候是两个?
其实答案很简单:
- 带有
单个$ 符号的操作,代表这是 OData 协议支持的标准操作。
从 OData 协议的官网 上可以找到所有这些标准操作的列表,比如:
- $search
- $filter
- $count
- $orderby
- $skip
- $top 等等。
以两个 $$ 开头的操作,说明是 SAP 引入的自定义参数,用以同 OData 协议标准的操作相区分。
这个道理其实和 SAP UI5 index.html 页面里,id 为 sap-ui-bootstrap 的引导 script 元素里,有大量 data-sap-XXXX 属性定义的道理一样。这些属性用 data-sap 开头,也是为了避免和 HTML 标准的属性相冲突的可能性。
OData V4 模型支持为 read, update 和 delete 操作分别指定不同的 group ID. 调用 OData Model API 提交的更改请求,会根据 group ID 合并到同一个批处理请求中。
关于 group id 字段的更多细节,请参考这两篇文章:
边栏推荐
- [advanced MySQL] MTS master-slave synchronization principle and Practice Guide (7)
- Array related knowledge
- 清华&商汤&上海AI&CUHK提出Siamese Image Modeling,兼具linear probing和密集预测性能!...
- 【业务安全-01】业务安全概述及测试流程
- 每日3题(2):检查二进制字符串字段
- Bidding announcement: Oracle database maintenance service procurement of the First Affiliated Hospital of Jinan University
- Resolve activity startup - lifecycle Perspective
- 跨境电商多商户系统怎么选
- 2022-06-27日报:Swin Transformer、ViT作者等共话:好的基础模型是CV研究者的朴素追求
- 数学建模经验分享:国赛美赛对比/选题参考/常用技巧
猜你喜欢

【业务安全03】密码找回业务安全以及接口参数账号修改实例(基于metinfov4.0平台)
![[xman2018 qualifying] pass](/img/eb/7bf04941a96e9522e2b93859266cf2.png)
[xman2018 qualifying] pass

基于 Nebula Graph 构建百亿关系知识图谱实践

Référence forte, faible, douce et virtuelle de threadlocal

PostgreSQL 15新版本特性解读(含直播问答、PPT资料汇总)

How to solve the problem of missing language bar in win10 system

Synchronized与锁升级

ReentrantLock、ReentrantReadWriteLock、StampedLock

Pri3d: a representation learning method for 3D scene perception using inherent attributes of rgb-d data

【OS命令注入】常见OS命令执行函数以及OS命令注入利用实例以及靶场实验—基于DVWA靶场
随机推荐
522. longest special sequence II / Sword finger offer II 101 Split equal sum subset
NLP - monocleaner
【mysql进阶】MTS主从同步原理及实操指南(七)
How to solve the problem of missing language bar in win10 system
Design skills of main function of Blue Bridge Cup single chip microcomputer
Tsinghua & Shangtang & Shanghai AI & CUHK proposed Siamese image modeling, which has both linear probing and intensive prediction performance
阅读别人的代码,是一种怎样的体验
Array related knowledge
为什么 Oracle 云客户必须在Oracle Cloud 季度更新发布后自行测试?
Redis master-slave replication, sentinel mode, cluster cluster
OpenSSF安全计划:SBOM将驱动软件供应链安全
[xman2018 qualifying] pass
Semaphore of thread synchronization
[PHP code injection] common injectable functions of PHP language and utilization examples of PHP code injection vulnerabilities
Computer screen splitting method
QT 如何在背景图中将部分区域设置为透明
AQS Abstract queue synchronizer
my. INI file configuration
PR second training notes
ThreadLocal之强、弱、软、虚引用