Show TOC

Location of CodingLocate this document in the navigation structure

Use

All Web Dynpro components and their constituent controllers are created as a result of design time declarations. Once these declarations have been made, the Web Dynpro developer is free to add their own coding at predefined locations.

All Web Dynpro controllers have a well defined Application Programming Interface (API). This API comprises a static part that can always be assumed to be present, but it also has a variable part that is generated in response to design time declarations. This gives Web Dynpro programs a highly flexible, and developer friendly API.

You can enter source code to implement functionality in the following areas:

  • Standard lifecycle hook methods that control the initialization and end-of-life of controller instances.

  • Standard round-trip hook methods that perform controller specific tasks.

  • Custom written event handlers that respond to specific user actions on the client.

  • Custom controllers that encapsulate some reusable unit of functionality.

  • Rebuilding data held in the controller's context.

Hook Methods

What ever custom code you require must be placed into specific locations known as hook methods. The hook methods act as a predefined entry points into your custom code from the Web Dynpro metamodel coding. Whatever coding you add into these hook methods will always be preserved, even if the Web Dynpro toolset needs to regenerate the entire application.

To implement your own functionality within a Web Dynpro controller, it can only be done at predefined locations within the source code. These locations are identified with special comment markers. Any attempt to enter source code outside these comment markers will result in the loss of that code.

Note

If any custom coding that has been entered outside the designated areas, somehow manages to survive the regeneration process, then it places the deployed application outside of SAP's standard support agreement.

More Information