Thursday, October 6, 2016

Hooks Methods of Webdynpro Controller

Along with the previously mentioned application methods, each local controller interface has a fixed number of methods that can only be called by the run-time. The application developer cannot specify when these methods are called, but can modify the implementation. The time when these methods are called is predefined. For a description, refer to the phase model of Web Dynpro.


WDDOPOSTPROCESSING
•          This method is called in the last process step before rendering. Therefore, it allows you to add application-specific clean-up processes
WDDOBEFORENAVIGATION
•          The method WDDOBEFORENAVIGATION can be used to perform an additional validation of those controller contexts that are required in the application but have not been validated in the request/response cycle yet .
•          This method can only be used for the component controller
WDDOAFTERACTION
•          This method is called for all visible views at the time an action is executed.
•          Here functions can be placed that are carried out equally for all associated event handlers.
WDDOBEFOREACTION
•          Before an action is triggered, you can perform your own validations using this method.
•          The method can only be used for view controllers.
•          It is used for all visible views of the component assigned to the current phase model instance. These include all embedded components
WDDOOPEN and WDDOCLOSE
•           Every window controller has the WDDOONOPEN and WDDOONCLOSE hook methods.
•          These two methods are only processed when a window is opened or closed as a dialog box.
•          Since the opening of a dialog box does not involve any navigation, no inbound plug is called and therefore no event handler method is processed.
•          The WDDOONOPEN method can therefore be used to implement initializations  
WDDOAPPLICATION STATECHANGE (Handling for Suspending &Resuming an Application
•         It is processed whenever the status of an application changes - that is precisely when the application is transferred from running to suspend mode and when it is subsequently 
           restarted via the resume plug.
•         This method thus replaces the 'WDDOEXIT' method in the phase model. 
•         Application development can - but does not have to - add code to the method 'WDDOAPPLICATIONSTATECHANGE'.
           However it can be useful, for example, to delete database locks in this method that are not be in place during the resume state.
WDDOMODIFYVIEW (Method for Modifying the View before Rendering)
•         This is the only method in which dynamically modifying the UI controls is permitted. 
•         The reference to the view and the information whether this view is displayed for the first time are passed to the method.  
To know the complete explanation of the hook methods is given in the reference,

No comments:

Post a Comment

SAP giới thiệu mã hỗ trợ AI trong ngôn ngữ ABAP riêng của mình

SAP đã ra mắt một loạt tính năng mã hỗ trợ AI trong môi trường phát triển ứng dụng dựa trên đám mây của mình, đồng thời tham gia vào danh sá...