当前位置:网站首页>关于 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 字段的更多细节,请参考这两篇文章:
边栏推荐
- Use GCC to generate an abstract syntax tree "ast" and dump it to Dot file and visualization
- Unity3d best practices: folder structure and source control
- AutoCAD - line width setting
- CV领域一代宗师黄煦涛教授86岁冥诞,UIUC专设博士奖学金激励新锐
- 清华&商汤&上海AI&CUHK提出Siamese Image Modeling,兼具linear probing和密集预测性能!...
- Bidding announcement: Oracle database maintenance service procurement of the First Affiliated Hospital of Jinan University
- 基于SSM的Web网页聊天室系统
- Array related knowledge
- enable_ if
- Jupiter core error
猜你喜欢

清华&商汤&上海AI&CUHK提出Siamese Image Modeling,兼具linear probing和密集预测性能!...

ReentrantLock、ReentrantReadWriteLock、StampedLock

CV领域一代宗师黄煦涛教授86岁冥诞,UIUC专设博士奖学金激励新锐

enable_ if

R language objects are stored in JSON

Redis持久化

Interpretation of new version features of PostgreSQL 15 (including live Q & A and PPT data summary)

SFINAE

Array related knowledge

Leetcode 724. 寻找数组的中心下标(可以,一次过)
随机推荐
CCID Consulting released the database Market Research Report on key application fields during the "14th five year plan" (attached with download)
Pycharm安装与设置
基于 Nebula Graph 构建百亿关系知识图谱实践
[an Xun cup 2019]attack
[microservices sentinel] hotspot rules | authorization rules | cluster flow control | machine list
R language objects are stored in JSON
Jupiter core error
高德地图IP定位2.0备份
【业务安全-02】业务数据安全测试及商品订购数量篡改实例
【微服务|Sentinel】热点规则|授权规则|集群流控|机器列表
Design and implementation of food recipe and ingredients website based on vue+node+mysql
Practice of constructing ten billion relationship knowledge map based on Nebula graph
简析国内外电商的区别
Getting to know cloud native security for the first time: the best guarantee in the cloud Era
Redis持久化
At a time of oversupply of chips, China, the largest importer, continued to reduce imports, and the United States panicked
ThreadLocal之强、弱、软、虚引用
Pisa-Proxy 之 SQL 解析实践
【OS命令注入】常见OS命令执行函数以及OS命令注入利用实例以及靶场实验—基于DVWA靶场
Using redis skillfully to realize the like function, isn't it more fragrant than MySQL?