如何查找SAP UI5控件ID

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/i042416/article/details/84980530

UI5控件的ID生成逻辑是怎样的?可以通过调查这个方法this.getView().byId()的实现来弄清楚。
在这里插入图片描述

发现在构造函数constructor里,有两处进行控件id的赋值:
在这里插入图片描述
从uid能发现UI5内部在内存里维护了一个计数器MuidCounts。
在这里插入图片描述
注释写的很清楚了:Convert the given view local Element id to a globally unique id by prefixing it with the view Id

在这里插入图片描述

猜你喜欢

转载自blog.csdn.net/i042416/article/details/84980530