view controller lifecycle discussion - beforeRendering
View Controller lifecycle
2023-09-14 09:02:42 时间
Created by Jerry Wang on Aug 07, 2014
BeforeRendering Trigger point:
Callstack1:
h就是当前的html document:
![](https://user-images.githubusercontent.com/5669954/28252977-26d48bd2-6ad0-11e7-8d7c-a542fea93f20.png)
Callstack2: 在当前的ui5 document ready之后,执行finishTask操作。
![](https://user-images.githubusercontent.com/5669954/28252980-26d66970-6ad0-11e7-9d90-5d9f412232f9.png)
Callstack3: 执行当前ui区域m[i]的rerender 方法:
![](https://user-images.githubusercontent.com/5669954/28252978-26d5a666-6ad0-11e7-8cb4-d5fc81feec15.png)
Callstack4: 调用render manager 绘制JS view:
![](https://user-images.githubusercontent.com/5669954/28252981-26e8a248-6ad0-11e7-8946-d3791770102f.png)
绘制的位置就是html里面id为content的DIV元素:
![](https://user-images.githubusercontent.com/5669954/28252982-26fd7e70-6ad0-11e7-840f-812c83278c83.png)
Callstack5: render manager 开始render JS view:
![](https://user-images.githubusercontent.com/5669954/28252970-2686fd90-6ad0-11e7-98f2-41c23849d3f7.png)
Callstack6: 在render manager的实现里,首先掉beforeRender的callback:
![](https://user-images.githubusercontent.com/5669954/28252971-269816ac-6ad0-11e7-9b87-fa3abe89ebf1.png)
就在下面不远处还有AfterRender的callback调用:
<img src="https://user-images.githubusercontent.com/5669954/28252973-2698db8c-6ad0-11e7-9a58-cbb707e0ed47.png)
Callstack7: JS view instance调用sap.ui.core.mvc.View.onBeforeRendering方法:
Callstack8: fire BeforeRendering:
Callstack9: 和之前的onInit一样,JS view instance调用EventProvider的方法fireEvent来调用beforeRendering callback:
最后application的onBeforeRendering被调用:
要获取更多Jerry的原创文章,请关注公众号"汪子熙":
相关文章
- Android绘图机制(二)——自定义View绘制形, 圆形, 三角形, 扇形, 椭圆, 曲线,文字和图片的坐标讲解
- http://www.cda.cn/view/25735.html
- [Backbone]3. More detail on View
- Android2.2 API 中文文档系列(5) —— View
- why our extension project didn't load S3 view and controller
- where is application controller bound to application main view
- SAP UI5 -all controls within the same view will share the same data Model
- 如何基于 SAP CDS view 生成 object page
- SAP WebClient UI view controller所有可用的属性列表
- SAP Spartacus split view里每个元素宽度的计算方式
- Cloud for Customer里XML view的加载原理
- Cloud for Customer里XML view的加载原理
- SAP SD里CDS view对status的设计
- KPI tile在launchpad里正常显示number,但是进不了detail view
- 如何基于 SAP CDS view 生成 object page
- SAP Fiori Elements - how to set breakpoint to get converted xml view parsed by f
- iOS(swift)给view添加点击事件(手势)UIGestureRecognizer
- RuntimeError: a view of a leaf Variable that requires grad is being used in an in-place operation.
- LinearLayout具体解释三:LayoutInflater创建View过程分析
- 小程序开发之scroll-view中id不能以数字开头的问题