SAP CRM Fiori reuse library的代码审查

105 阅读1分钟

Opaque comment

Since you have defined attribute “displayMode” as type Boolean, so it can be assigned with true of false.

Then your comment is opaque. What does “’has value” mean? True or false?

Code robustness

More information about id uniqueness

Further study:
help.sap.com/saphelp_uia…
if we are in ui component context, we do not need to concatenate id prefix and id body manually, as suggested by sap help above:
Create all views, controls, and elements in a UI component by using the this.createId() method and retrieve them by using the this.byId() method.

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