UI element ID generation logic in BSP and JSP

CRM WebClient UI

In which line of ABAP code are the ids in C#_W# format of the DOM elements rendered by the WebClient UI generated?

Refer to my blog WebClient UI element ID generation logic

Hubris

Since it is a JSP, it is the same as the BSP based on server-side rendering. Hybris application developers don't have to reinvent the wheel and use the ycommerce tag directly in the JSP page:

The ycommerce tag is implemented as follows. The implementation of this JSP tag can also be clearly seen from the comments. In order to ensure that the id is unique, the same method as the CRM WebClient UI is adopted: a counter is maintained internally, and 1 is added after each element is generated.

The code to increment the counter by one:

Equivalent to line 16 of the WebClient UI:

JSP cannot be executed directly by the browser, but is compiled into .class, and finally the native HTML code output by the browser is generated in these .classes:

To get more original technical articles from Jerry, please follow the public account "Wang Zixi" or scan the QR code below:

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=325855949&siteId=291194637