If a used component of the using component wants to provide a method to be called, this method must be defined in the interface controller of the used component.
In practice, the method to be called is generally declared in the interface controller of an interface definition and programmed in the component controller of an implemented component. The code fragment below shows a section of a method of a view controller of the using component:
method MY_CONTROLLER_METHOD .
data: L_INTF_CONTROLLER type ref to IWCI_ L_COMPONENT_USAGE type ref to IF_WD_COMPONENT_USAGE.
L_INTF_CONTROLLER ?= L_COMPONENT_USAGE->GET_INTERFACE_CONTROLLER( ).
L_INTF_CONTROLLER-> . . endmethod.
|
L_COMPONENT_USAGE is a reference to the dynamically created component usage. L_INTF_CONTROLLER is a reference to the interface controller of the used component/component interface.
No comments:
Post a Comment