When using the event handlers, there's a suite of interesting objects you have access to.
Which objects ?
You may realize that object orientation in BSP applications is a key factor. There's a nice suite of classes available at runtime, which are listed here:
Application | Type ref to [application class] |
This is where your own class can be filled in on the BSP properties page. There can be such a class holding whichever information and methods you deem relevant per BSP application. The idea is that the "business logic" of the BSP application is held on this class. Methods (and attributes) in this class can be accesed from every page of the BSP application. | |
Runtime | Type ref to If_BSP_Runtime |
Object which allows access to information (attributes) like: Runtime_url, session_id, application_name (theme & url), client_info (type ref to IF_CLIENT_INFO). The information that would apply to any runtime BSP or other internet application can be accessed here. There's also a suite of methods which can be used to determine accessibility settings. | |
Page_Context | Type ref to If_BSP_Page_Context |
Object without attributes which caters for page context functionality. E.g. access to the Request object via method GET_REQUEST . Information about the BSP's navigation settings (tree) can be picked up with GET_MODEL and GET_NAVIGATION . |
|
Page | Type ref to If_BSP_Page |
Attributes about the actual page, including a list of Messages that could be the base of your error handling setup. Lifetime settings and formatting options. The methods give access to application info (name, theme, url) and setting attribute values can also be done. |
|
Request | Type ref to If_HTTP_request |
The Request in HTTP terms (not necessarily BSP terms) - allows access to information like cookies (cookie fields), actual html data contents, (html) form fields and such, of the HTML request that is presented to the end user. | |
Response | Type ref to If_HTTP_response |
The Response in HTTP terms (not necessarily BSP terms) - allows access to information like cookies, actual html data contents, (html) form fields and such, of the HTML request that has been returned by the end user. Request and Response are much alike, but very different: the request is "outbound" and the response is "inbound"... | |
Navigation | Type ref to If_BSP_Navigation |
Holds the method GOTO_PAGE and NEXT_PAGE to steer the BSP application to the next level.. Navigational methods (no attributes) on this object. |
Usage / availability per event handler
The following overview shows which of the objects is available in your event handler.
On.. |
Create |
Request |
|
|
|
Destroy |
Application | available | available | available | available | available | available |
Runtime | available | available | available | available | available | available |
Page_context | available | available | available | available | available | available |
Page | available | available | available | available | available | available |
Request | available | available | available | available | ||
Response | available | available | ||||
Navigation | available | available | available | |||
Event_id | available | available |
Note: Event_id
is type string.