An example how to configure outbound plug delegation mapping

245 阅读2分钟

| * delegated

  • delegation# Created by Jerry Wang on Feb 17, 2015create an outbound plug DEFAULT in window below: clipboard1 Implementation: clipboard2 Define the outbound plug also in runtime repository: clipboard3 in component usage tab, delegate the outbound plug DEFAULT to its window via context menu: clipboard4 Ensure this mapping information could be parsed successfully via metadata check tool: clipboard5 In the runtime, with the help of mapped outbound plug, the parent window's outbound plug will be executed instead of the current window itself. clipboard6 | | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |

 

 

@i042416 i042416 added the CRM WebUI label on Jul 9, 2017

@i042416

Owner Author

i042416 commented on Jul 9, 2017

 

# An example why we need to configure outbound plug mapping## Created by Jerry Wang, last modified on Feb 25, 2015Starting point: clipboard1   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 clipboard2   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. clipboard3  Method OP_CREATE is called dynamically. clipboard4  That method in window will call fire_outbound_plug ( don't mix it with CALL_OUTBOUND_PLUG !!) clipboard5  Inside the method, it will call the navigate method of its parent window's view manager: clipboard6  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. clipboard7  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: clipboard8  There is one navigation target found: clipboard9   clipboard10   clipboard11  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: clipboard12   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 ).clipboard13 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.clipboard14 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:clipboard15 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.Now me points to standard ui window controller, which is just exactly what we wantclipboard16 Only this standard window reference can have right to fire cross component navigation:clipboard17 clipboard18 clipboard19