CRM product UI 里 assignment block 的显示隐藏逻辑

我们在 product overview page 里能看到很多的 assignment block。但是 runtime 的时候真正显示出来的内容只是 configuration 里面看到内容的一个子集。


Product category 能够 assign 很多 settype 和 relationship,每个 settype 和 relationship 都对应一个 UI view.

runtime 的时候,我们会根据 product category 找到上面 assign 的 settype 和 relationship,再把对应的 UI 以 assignment block 的形式显示出来。具体逻辑:
(1) 首先在这个方法 GET_LIST_OF_STATIC_VIEWS 里拿到 Workbench configuration 里面看到的 view list:


(2) 这个 GET_VIEWS_TO_DISPLAY 方法会 determine 出运行时真正应该显示给最终用户看的 view list:

调试 GET_VIEWS_TO_DISPLAY 能获得更多信息。
首先找到 product 的 category 分配的 settype 和 relationship list:

表 CRMC_PRIL_UIU 存放了 settype 和 UI view 的映射关系:


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

版权声明: 本文为 InfoQ 作者【Jerry Wang】的原创文章。
原文链接:【http://xie.infoq.cn/article/23c636e3f77dfcbc694d312d8】。
本文遵守【CC-BY 4.0】协议,转载请保留原文出处及本版权声明。
评论