SAP Webdynpro ABAP Controller Methods and Attributes, Methods and Attributes are available for all webdynpro abap controllers. These methods are Hook Methods, Instance Methods, and Attributes. Refer this post for more details on Webdynpro ABAP Controller Methods and Attributes. Click on read more.
SAP Webdynpro ABAP Controller Methods and Attributes
SAP Webdynpro ABAP Controller Methods and Attributes, Methods and Attributes are available for all webdynpro abap controllers. These methods are Hook Methods, Instance Methods, and Attributes. Refer this post for more details on Webdynpro ABAP Controller Methods and Attributes.
Hook Methods
For all controllers, there exist methods that are called by the Web Dynpro framework in a predefined order. These are called hook methods. Depending on the controller type, there are different hook methods available.
Instance methods
These methods are defines explicitly using the Methods tab.
Attributes
Attributes not related to the value or property of UI elements can be declared using the Attributes tab. These attributes are then visible in all methods of this controller.
Common Controller Entities
The context root node already exists. All other nodes and attributes have to be defined statically or by source code.
Two hook methods are contained in all controller types :
wddoinit( )
wddoexit( )
Two pre-defined attributes are contained in all controller types :
WD_THIS
WD_CONTEXT
At least two hook methods are contained in all controller types. These methods are processed only once during the lifetime of a controller instance:
when a controller instance is created (wddoinit( )) and
when a controller instance is deleted (wddoexit( )).
Attributes not related to the value or property of UI elements can be declared using the Attributes tab. These attributes are then visible in all methods of this controller.
There are two predefined attributes, which are used to access the functionality of the controller (WD_THIS) and of the context (WD_CONTEXT).
For information to be shared between different controllers, one controller must declare the use of another controller.
This is done on the Properties tab of the controller that needs to access another controller.
The most frequent requirement for this kind of data sharing is when you wish to create a mapped context node or you wish to access another controller's instance methods.
Special Entities of Component / Custom Controllers
EventsFor both component and custom controllers, events can be defined with arbitrary parameters.
Any method of any other controller (also view and window controllers) can register to these events if this method is defined as an event handler method
Additional standard hook methods
wddobeforenavigation( )
These are processed directly before the navigation requests are processed
wddopostprocessing( )
After all views of the view assembly to be sent have been processed
A typical use of such events is the invocation of processing in a view controller after processing in the component controller has been completed.
This can be achieved when a method in the view controller subscribes to an event raised by the component controller.
Using your design time declarations, the Web Dynpro framework will automatically manage the definition, triggering, and handler subscription to such events for you. You also have the additional option of dynamic event subscription at runtime.
The component controller and only the component controller has additional standard hook methods. These are processed directly before the navigation requests are processed (wddobeforenavigation( )) and after all views of the view assembly to be sent have been processed (wddopostprocessing( )).
Attributes, methods, context elements, and events can be marked as interface elements. These elements are then exposed to other components by means of the interface controller.
Special Entities of View Controllers
Navigation plugsA navigation event is raised when an outbound plug is fired
Any An inbound plug is the navigation event handler that can be registered to a navigation request
Actions
An action links a client-side event to an event handler method defined in the corresponding view controller
Special hook methods
wddobeforeaction( )
Wddobeforeaction()
wddomodifyview( )
Using the generic name <Outbound plug> for an outbound plug, its declaration will cause a method to be generated in the view.s component controller, called FIRE_<Outbound plug>_PLG.
This method is only visible for the Web Dynpro framework; it is not visible to the developer.
An inbound plug is the navigation event handler that can be registered to a navigation request.
Using the generic name <Inbound plug> for an inbound plug, its declaration will cause a method to be generated in the views component controller, called HANDLE<Inbound plug>.
A static registration of an inbound plug (method HANDLE<Inbound plug>) to the navigation event raised by an outbound plug (method FIRE_<Outbound plug>_PLG) is called a navigation link.
Navigation links are not part of a view but are defined in a window embedding the view. Thus, in different windows, the event registration can be defined differently.
When defining an action having the name <Action>, an event handler method (ONACTION<Action>) is automatically generated.
If a view will be replaced as a result of a client event, the related outbound plug can be fired in this action event handler method.
There are two special hook methods found in view controllers
wddobeforeaction( ) is processed if a client event is fired in any view. Before the action event handler methods are processed.
wddobeforeaction() methods are executed for all views that are part of the last view assembly.
wddomodifyview( ) is a method that allows you to programmatically manipulate the layout of the view. This event can be used to define the UI dynamically.
Special Entities of Window Controllers
Each Web Dynpro window contains outbound plugs and inbound plugs, like views. You can use the plugs to set up cross-component navigation.
The window controller also has the special attribute WD_COMP_CONTROLLER, which holds the reference to the component controller.
The Window controller contains following special attributes
WDDOONOPEN() Handling For Opening of Window
WDDOONCLOSE() Handling For Closing of Window
Each Web Dynpro window contains outbound plugs and inbound plugs, like views. You can use the plugs to set up cross-component navigation.
To expose the plugs to the component interface, select the property Interface for each plug.
These plugs will then be part of the related interface view.
The window controller also has the special attribute WD_COMP_CONTROLLER, which holds the reference to the component controller.
"You found the information helpful and want to say thanks? Your donation is enough to inspire us to do more. Thanks a bunch!"
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.