zl程序教程

您现在的位置是:首页 >  其他

当前栏目

SAP CRM Collection wrapper的publish_current用法

SAP 用法 CRM Current collection Wrapper Publish
2023-09-14 09:03:03 时间

Created by Jerry Wang, last modified on Apr 19, 2014

在进入product detail页面时,在初始化context node CREATE_CONTEXT_NODES方法里,会依次调用Product sub node对应的context node的CREATE_方法,里面会manual call ON_NEW_FOCUS:
clipboard1
在 on_new_focus方法里会从传入的product entity出发,call GET_RELATED_ENTITIES拿到当前最新的针对该Product entity对应的relation collection信息( line 29),然后更新到sub node context node的collection wrapper里( line 67 )
clipboard2
同时在CONNECT_NODE里为new_focus event注册event handler:
clipboard3
clipboard4

从而每当collection wrapper raise出new_focus event时,所有sub node的context node class都会响应该event,调用 event handler ON_NEW_FOCUS进行相应处理,例如在从Product A的overview page点back回到search view,再进入product B overview page时:
clipboard5
clipboard6