前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >什么是SAP UI5的Component-preload.js

什么是SAP UI5的Component-preload.js

作者头像
Jerry Wang
发布2020-02-17 11:07:31
4030
发布2020-02-17 11:07:31
举报

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!

本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2020-02-04 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档