
OnInitialization
Use
This event handler is processed directly after OnRequest during page processing.
This handler implements data retrieval. The data is stored in page attributes and is therefore accessible in the layout and in the other event handlers.
Integration
While the event handler
OnCreate is used to initialize objects needed for entire page, OnInitialization is used for getting data from database tables.If you develop a BSP for managing a shopping basket, the shopping basket object is initialized using OnCreate and then filled with selected products. Here, this would be the catalog ID and the number of objects. You use OnInitialization to read the short texts from the database, calculate the current subtotal, and so on.
Functions
You can access the following objects in the implementation:
|
Object |
Reference Type |
Description |
|
APPLICATION |
type ref to application class |
Application class refers to the individual application or application class specified in the BSP application. If there is no application class in the BSP application, this means that the object application is not available. |
|
RUNTIME |
type ref to IF_BSP_RUNTIME |
The runtime object is defined in interface IF_BSP_RUNTIME . |
|
REQUEST |
type ref to IF_HTTP_REQUEST |
The request object is defined in interface IF_HTTP_REQUEST. |
|
RESPONSE |
type ref to IF_HTTP_RESPONSE |
The response object is defined in interface IF_HTTP_RESPONSE. |
|
NAVIGATION |
type ref to IF_BSP_NAVIGATION |
The navigation object is defined in interface IF_BSP_NAVIGATION. |
|
PAGE |
type ref to IF_BSP_PAGE |
Page object is defined in interface IF_BSP_PAGE. |
|
PAGE_CONTEXT |
type ref to IF_BSP_PAGE_CONTEXT |
Page context object is defined in interface IF_BSP_PAGE_CONTEXT. |
Example
BSPs with Layout, Initialization and Navigation