Hi,
I have got some confusion regarding the linking of two components. The procedure that I am following is as follows:-
Suppose I want to access elements of COMP1 from COMP2. Then in COMP2 i need to expose the elements that i want to access from COMP1.This can be done by including those elements in the interface controller COMP2. After that we need to create a component usage of COMP2 in COMP1. Then in the method WD_USAGE_INITIALIZE of the component controller COMP1 i need to bind the nodes of COMP2 to COMP1. This can be done by calling the method bind_context_node
from within WD_USAGE_INITIALIZE as shown below:-
WHEN 'COMP_USAGE_NAME'.
CALL METHOD lv_usage->bind_context_node
EXPORTING
iv_controller_type = cl_bsp_wd_controller=>co_type_custom
iv_name = 'IV_NAME'
iv_target_node_name = 'NODE1'
iv_node_2_bind = 'NODE2'.
But in some standard controllers I have found this code as well
WHEN 'COMP_USAGE_NAME'.
get_custom_controller( 'Custom_Controller' ).
I am not too sure about the functionality of this code.How a custom controller can be used to access elements from another component?
Thanks,
Samrat