- 什么是SAP UI5的Component-preload.js
- SAP UI5 设备类型检测 Device API 的工作原理
- 关于 SAP UI5 参数 $$updateGroupId 前面
- 通过 FileUploader 的初始化,了解 SAP UI5
- 关于 SAP UI5 Web Components
- 如何通过 ABAP 代码给 SAP OData 元数据增添注解试
- 深入学习SAP UI5框架代码系列之一:UI5 Module的懒
- Fiori-like Prototype ( 2021 SAP
- SAP UI5 Smart Table 和 Smart Filt
- SAP ABAP OData 服务的分页加载数据集的实现(Pag
First of all, the Component-preload.js works as expected. In your design time, ( WebIDE or Eclipse ) , all development artifact, the .js files are organized into different folders. And in the productive use case, the content of all js files are combined into a single file to save network traffic, reduce needed roundtrip to load those resource. See more details from these links:
http://scn.sap.com/thread/3652908
http://scn.sap.com/thread/3486179
So back to your question: why although you have overwritten onAfterRendering method, however still the standard one is called in the runtime?
Again, this unexpected behavior is caused by closure.
The AfterRendering function is not directly called but via event-subscribe&raise style, via javascript keyword apply.


If you find the framework code is difficult to read, just refer to the example below which is caused by the same reason by easier to understand.
http://stackoverflow.com/questions/750486/javascript-closure-inside-loops-simple-practical-example
finally, the purpose of the line oAtt.oHeaderToolbar.setVisible(false); is to hide the built-in toolbar of the attachment subview. If this line is missing, there will be duplicate toolbar for each uploaded attachment.
Currently the standard code in onAfterRendering never considers the possibility that the attachment panel would be removed from UI, thus I think this is a bug. Please kindly create one incident to my component and we will do a fix for it. Thanks a lot!

要获取更多Jerry的原创文章,请关注公众号"汪子熙":

网友评论