CRM WebClient UI outbound plug的使用

版权声明:本文为博主汪子熙原创文章,未经博主允许不得转载。 https://blog.csdn.net/i042416/article/details/89024023

Starting point:

An example why we need to configure outbound plug mapping

Technical information: CRMCMP_IBSEARCH/HeaderResultList

requirement: click button “Create Service Contract”, and this will lead to navigation to service contract creation ui.

View hierarchy information

Why do we need outbound plug mapping?

In order to answer it, we must first understand the case when the outbound plug mapping is not necessary.

Result view call outbound plug, pay attention to lr_window.

Method OP_CREATE is called dynamically.

That method in window will call [fire_outbound_plug]{.underline} ( don’t mix it with CALL_OUTBOUND_PLUG !!)

Inside the method, it will call the navigate method of its parent window’s view manager:

Just check the previous view hierarchy screenshot, the method navigate simply insert a new navigation entry to internal table mav_queue, which will be parsed later. Pay attention to which window reference the variable me points to.

And now the navigation entry is handled. The ls_nav_step-owner_window just points to the outer window stored in “me” in previous screenshot:

There is one navigation target found:

So far it works perfectly, however all the logic are working based on static navigation, e.g all navigation information are maintained in design time:

However in order to fulfill the requirement, cross component navigation is necessary - it is not possible to maintain navigation information in design
time.Instead, we must delegate the outbound plug from view HeaderResultList to its wrapper window IB150M_IBASE, and the wrapper window will trigger cross component navigation.

The main difference for outbound plug mapping in runtime

Recall the scenario of normal view navigation, the method call_outbound_plug of its direct window ( CMP Window ) is called.In the mapping case, as its name shows,the method call_outbound_plug of the outer wrapper window is called: The outbound plug is delegated from: 1. view iteself -> 2. direct
window ( CMP window ) ->3. outer wrapper window ( IB150M window ).

The reason why we need the outer wrapper window here is to achieve the cross component navigation logic.

In the outer wrapper window, it is wrong to use call_outbound_plug since it will lead to endless recursive call.

Neither the view manager->navigate must be called, it still causes the wrapper window is inserted as a starting window in navigation entry. The correct way is to call [fire_outbound_plug]{.underline}:

[In this way we gain access to wrapper window’s parent view manager, since now we are inside the implementation of cl_bsp_wd_window and all private attributes are available]{.underline}.

Now me points to standard ui window controller, which is just exactly what we want!

Only this standard window reference can have right to fire cross component navigation:

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

猜你喜欢

转载自blog.csdn.net/i042416/article/details/89024023