当前位置:网站首页>Analysis of runtime instantiation of XML view root node in SAP ui5
Analysis of runtime instantiation of XML view root node in SAP ui5
2022-06-11 18:39:00 【Hua Weiyun】
Mission : analysis SAP UI5 root XML The view loading logic .

Put the mouse on initiator In this column , Find the name of the call stack UIComponent.js Of createContent Method :

You can see , Here's the logic , from manifest.json Parsing out root view Definition , Then instantiate the view .



Let's look at another root View loading failed SAP UI5 application :

Access to XMLHttpRequest at ‘https://sapui5.hana.ondemand.com/resources/sap/ui/demo/CombineLatest/Combine.view.xml’ from origin ‘http://localhost:3002’ has been blocked by CORS policy: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.
Also successfully resolved root view The name of the :

Use ajax load xml view:


Correct path:

FALSE path:

hit :
See the application of the problem again :
We got a problem : Case mismatch .
This c Change to C after , The problem disappears :
XML Views provide special handling for context binding and style classes . Developers can use the XML Node to specify them . Please note that , These properties are not properties of individual controls , Therefore, it is not supported by the control constructor . When binding the content aggregation of this control , Binding template of bound content aggregation cannot have HTML Mark . An error will be thrown when the above combination is detected .
Application code should not call constructors directly , And should be used XMLView.create Or with XML Type of View.create factory . Factories provide more functionality than constructors ( Such as caching and preprocessing ) It also simplifies the asynchronous loading of views . Future functionality may only be available when using the plant .
Accept and define the initial attribute value 、 Aggregate and associate objects and object literals for event handlers mSettings.
This class does not have its own settings , But you can use the appropriate for the base type sap.ui.core.mvc.View All Settings .
边栏推荐
- 非递归实现二叉树的前、中、后序遍历
- Introduction to basic use and pit closure of BigDecimal
- On the sequence traversal of binary tree
- 论高可用架构
- .net core redis hyperloglog类型
- Construct enemy tanks
- Mysql从0到1的完全深入学习--阶段二---基础篇
- Gmail:如何撤回发出的邮件?
- Niu Ke swipes the question -- converting a string to an integer
- Prevent enemy tanks from overlapping
猜你喜欢

Niu Ke brushes the question - no two

Why is ti's GPMC parallel port more often used to connect FPGA and ADC? I give three reasons

全志科技T3开发板(4核ARM Cortex-A7)——视频开发案例
Téléchargement et téléchargement des fichiers nécessaires au développement

TI AM64x——最新16nm处理平台,专为工业网关、工业机器人而生

牛客刷题——不要二

Labelme for image data annotation

平衡搜索二叉树——AVL树

Async leads to unexpected function results and changes the intention of the original code; await is only valid in async functions and the top level bodies of modules
![[c language] compress strings and add markup characters](/img/b7/f7918f3ee0c409faffc70addd5ee65.png)
[c language] compress strings and add markup characters
随机推荐
力扣刷题——根据二叉树创建字符串
Quanzhi T3 development board (4-core arm cortex-a7) - detailed explanation of logo display during system startup
2022-2023年西安交通大学管理学院MEM提前批面试网报通知
Ubuntu installs PSQL and runs related commands
.net core redis hyperloglog类型
Apipost精妙使用技巧
一款自适应的聊天网站-匿名在线聊天室PHP源码
VIM common commands
力扣31 下一个排列
Niu Ke's question -- finding the least common multiple
Niu Ke's questions -- two sorting methods
Cool visualization tool: first introduction to processing
TR-069 protocol introduction
非递归实现二叉树的前、中、后序遍历
Combination sum of 39 questions
* Jetpack 笔记 LifeCycle ViewModel 与LiveData的了解
labelme进行图片数据标注
2023年西安交通大学管理学院MPAcc提前批面试网报通知
论工作流选型
Gmail:如何撤回发出的邮件?