如何提取SAP UI5 XML view里定义的字段元素绑定信息(binding path)
For SAP standard CRM Fiori application, we use xml view by default.
For some UI element, you could easily find its binding path in the corresponding xml view, for example we need to find out which json model field is the highlighted UI element below bound to:
It could simply be achieved by clicking “inspect” button in Chrome development tool, and click the UI element to find out the id generated in html native source code. Write down the part of it: opportunityProspectName.
Then search this in xml view, then binding path is found:
However, for this field below, the approach mentioned above does not work any more:
in xml view you could not find any hint by searching keyword “attribute5”.
Instead, you could type four keys at the same time “ctrl+alt+shift+s” to call SAPUI5 Diagnostics tool, then expand tab “Control Tree”, search “attribute5” there, then you could find the binding path: /EmployeeResponsibleName
You can confirm the correctness of this by verifying it in Chrome network tab: the value in the field you find in JSON model does exactly match the value displayed in UI.
And why the binding path of this field could not be found in xml view? It is simply because this UI element is not statically defined in xml view, but dynamically created via JavaScript. You could find its creation location by searching the keyword “/EmployeeResponsibleName“.
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
相关文章
- SAP UI5 XML 视图中数据绑定路径语法的难点和易混淆点的专题讲解
- SAP Fiori Elements 本地项目的 annotations.xml 文件
- SAP Fiori应用Footerbar区域按钮的高亮显示逻辑
- how does SAP UI5 filter for list work in xml view
- SAP CRM WebClient UI html 格式的 Text 显示逻辑
- 如何将自定义XML视图注入SAP Fiori Elements应用
- SAP ABAP字符和字符串变量隐式转换的一些规则
- SAP ABAP ALV list background render
- SAP ABAP实用技巧介绍系列之 使用XSLT替换xml中指定node的value
- SAP Commerce Cloud Spartacus UI 读取 Component 元数据的 Action 设计
- SAP Spartacus 数据类型定义汇总
- 如何下载SAP Cloud for Customer UI技术模型的XML源代码到本地
- 关于微软 Edge 浏览器无法访问笔者 SAP UI5 教程示例代码的问题
- SAP UI5 应用的 OData XML 格式的元数据请求解析原理,基于 DOMParser
- SAP UI5 xml 视图里定义的控件,运行时如何创建其实例的?
- SAP UI5 初学者教程之四:XML 视图初探试读版
- SAP UI5 应用 XML 视图的加载逻辑分析
- 对 SAP UI5 一无所知的新手,从哪些材料开始学习比较好?
- SAP CRM Fiori note automatic delete deletion scenario