Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

Frame Work Method Signifiance

Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

SAP CRM WEB Client UI SAP CRM Technical Training

Creation and Deletion of View Controllers

Methods
WD_VIEW_INITIALIZE This method is called to initialize a view on the framework side.
Do not redefine this method.

Use method, DO_REPLACE_INITIAL_VIEW, to adapt the view area content to your needs.
Do not call this method yourself.

BIND_VIEW Binds a view to a view area of a view set.


Do not redefine or call this method yourself.

DO_REPLACE_INITIAL_VIEW You can redefine this method in the implementation class to


Override the view that is displayed as default in a view area.

The default is taken from the runtime repository and can be replaced dynamically by implementing this
method. This is useful for a customizing-based initial view or if the initial view is dependent on the context
content.

NOTE: The replacing view has to be defined as content for the same view area of the same view set.

Initialization and Cleanup of Contexts

Methods
WD_CREATE_CONTEXT
This method is called once when a custom controller is instantiated or, for view controllers, each time the
view becomes visible.
The purpose is to create and initialize thecontext from a framework perspective.
Do not redefine that method,
But use DO_INIT_CONTEXT instead, which is made exactly for that purpose.
If you already redefined the method, as the DO_INIT_CONTEXT is relatively new, you do not have to
change it. However, if you have the time, it would be nice to change it.

DO_INIT_CONTEXT
This method is called once when a custom controller is instantiated or, for view controllers, each time the
view becomes visible to initialize the view controller context according to the application's needs.
This method is called by WD_CREATE_CONTEXT after all the framework initialization is done.
You should redefine it in your controller implementation class.

WD_DESTROY
This method is called to destroy the context of a controller. For view controllers, this happens each time
the view becomes invisible. It is used within the framework and cannot be redefined. It is also called when
the controller instance is deleted.

DO_CLEANUP_CONTEXT
This method is called to destroy the context of a controller. For view controllers, this happens each time
the view becomes invisible. It is called by WD_DESTROY before the framework destroys the controller's
context to allow controller to clean up its content internally. It should be redefined in the implementation
class.

WD_DESTROY_CONTEXT
This method is called to destroy the context of a controller. For view controllers, this happens each time
the view becomes invisible. It is used within the framework and cannot be redefined. It is called by
WD_DESTROY after DO_CLEANUP_CONTEXT.

Request Processing (Each Roundtrip)

Sameers108@gmail.com Sameer’s SAP CRM WEB Client UI Training


SAP CRM WEB Client UI SAP CRM Technical Training

Methods
DISPATCH_INPUT
This method is called by the view manager only to dispatch the input to all the active view controllers.
Do not call this method or redefine it.

DO_HANDLE_DATA
This method is called by DISPATCH_INPUT to process the input data of the controller of the incoming
request. The default implementation calls the FILL_MODEL_DATA method, which distributes the input to
all the context nodes (models in the sense of BSP) that are part of the controller's context.
You can redefine it to implement a specific logic to process incoming data.

DO_HANDLE_EVENT
This method is generated in your generated specific controller class to handle the event, for example,
button pressed, and to dispatch to the modeled event handlers. It might be necessary to redefine it
according to your controller specific needs, for example, table view row selection.

DO_REQUEST
This method is implemented in the view controller base class to create and display the view (layout class).
Do not redefine. Internally calls the SET_MODELS method.

SET_MODELS
This method binds the context nodes to the view layout instance’s page attributes for rendering. Method
Implementation is generated in the specific controller generated class. You can redefine it in the
implementation to set additional page attributes, if necessary.

Sameers108@gmail.com Sameer’s SAP CRM WEB Client UI Training

You might also like