欢迎访问 生活随笔!

生活随笔

当前位置: 首页 > 编程资源 > 编程问答 >内容正文

编程问答

SAP WebClient UI界面元素ID生成的逻辑分析

发布时间:2023/12/19 编程问答 35 豆豆
生活随笔 收集整理的这篇文章主要介绍了 SAP WebClient UI界面元素ID生成的逻辑分析 小编觉得挺不错的,现在分享给大家,帮大家做个参考.

If we open a WebClient UI page with Chrome and inspect its UI element via Chrome development tool, we could observe that the id attribute has some prefix for example C#_W#_V#_V#… where # represents a number.

Where is this id generated? Set a breakpoint on method CL_CHTMLB_CONFIG_UTILITY~RENDER_FROM_XML and we can find the method GENERATE_TAG_ID which did the job:

All the ID of the page in the view hierarchy will be concatenated as the prefix of current element’s ID.

If the current page is the first child of its parent, it has ID 1 assigned ( line 22 ), or else WebUI framework will increase the counter held internally and assign the latest value to the current UI element as ID ( line 16 ).

Finally the ID is concatenated with seperator “_”.

This ID will appear in the rendered HTML native code.
The capital characters contained in the ID are defined as constant attribute in CL_BSP_WD_CONTROLLER.

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

总结

以上是生活随笔为你收集整理的SAP WebClient UI界面元素ID生成的逻辑分析的全部内容,希望文章能够帮你解决所遇到的问题。

如果觉得生活随笔网站内容还不错,欢迎将生活随笔推荐给好友。