码迷,mamicode.com
首页 > Web开发 > 详细

什么是SAP UI5的Component-preload.js

时间:2020-02-08 19:39:28      阅读:190      评论:0      收藏:0      [点我收藏+]

标签:bar   clip   format   文章   detail   false   chm   hid   csdn   

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的原创文章,请关注公众号"汪子熙":
技术图片

什么是SAP UI5的Component-preload.js

标签:bar   clip   format   文章   detail   false   chm   hid   csdn   

原文地址:https://www.cnblogs.com/sap-jerry/p/12284425.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!