Each controller contains an additional set of methods provided by the runtime. They can be used for developing applications. You cannot change the implementation of the methods – unlike the implementation of all the other controller methods. The content of the method set depends on the controller type and its implementation state. Some of these methods are described in more detail below.
Method WD_GET_API
This method contains all controller types. Depending on the controller type this method returns a reference variable of the associated type to the controller.
1. Ig_Componentcontroller | 2. value(Result) type ref to IF_WD_COMPONENT |
3. If_“View_Name“ | 4. value(Result) type ref to IF_WD_VIEW_CONTROLLER |
5. Ig_“Window_Name“ | 6. value(Result) type ref to IF_WD_VIEW_CONTROLLER |
Method GET__CTR
The method GET_
Return Value
The method GET_
Example:
If you want to use methods of the component-global interface of a custom controller called MY_CUST_CONTROLLER within a view controller, you can enter a usage of the desired custom controller in the Properties tab. You can then use the method GET_MY_CUST_CONTROLLER_CTR in the local interface of the current controller.
method MY_CONTROLLER_METHOD .
data: L_REF_MY_CUST_CONTROLLER type ref to IG_MY_CUST_CONTROLLER.
L_REF_MY_CUST_CONTROLLER = WD_THIS->GET_MY_CUST_CONTROLLER_CTR( ). . . endmethod.
|
For general information on different interface types and their visibility within one or more Web Dynpro components, refer to chapter Controllers of a Web Dynpro Component in the tools manual of this documentation.
In the case of a view controller, the usage of the corresponding is almost always recommended, and therefore, this usage is automatically entered when you create a new view. A reference variable of the type IG_COMPONENTCONTROLLER of the variable is also created automatically. It is the variable
WD_COMP_CONTROLLER.
This reference variable is known to every view controller. It is entered on the Attributes tab of the view controller and can be used by the application developer. This also means that all methods of the component-global interface of the corresponding component controller are available.
For more information, refer to the following chapter Cross-Controller Method Call.
Methods WD_CPUSE_ and WD_CPIFC_
These two methods are important when using a component within another component. Refer to part 2 of this documentation under Component Usage Without Controller Access or Component Usage with Controller Access. These methods are created for each controller type, once a component usage or the usage of the interface controller of a used component is created.
Method FIRE__PLG
This method is only contained in view controllers and window controllers when an outbound plug is created for the corresponding controller. The method can be used to call an outbound plug from which navigation to a subsequent view or window is started.
Example:
method MY_CONTROLLER_METHOD
WD_THIS->FIRE_MY_OUTBOUND_PLG( ).
endmethod
|
For more information, refer to the chapter Navigation.
Method FIRE__EVT
This method allows each component controller or custom controller for which an event is defined to trigger this event.
No comments:
Post a Comment