Table of Contents
Previous Section
The request response loop is started in the main() function with the WOApplicationAdaptor method runWithApplication:.
There are three types of hooks into the request-response loop:
- Action methods that are associated with a particular user action such as clicking a button or hyperlink
- awake methods that are invoked at the point in the request-response loop just before the receiver begins to participate in the request handling
- Request and response handling methods that are invoked at a particular point in the request-response loop if you implement them
You can participate in the request-response loop by implementing any of the hooks provided.
The following list summarizes common uses of the request-response loop hooks:
- Action methods perform page navigation.
- Application awake methods initialize global variables and configure application behavior.
- Component awake methods initialize transaction and persistent variables.
- willPrepareForRequest:inContext: methods substitute a different object for the request page before user input is processed.
- didPrepareForRequest:inContext: methods substitute a different object for the request page before an action method is invoked.
- willGenerateResponse:inContext: methods substitute a different object for the response page before a response is composed. For instance, this method can be used authorize access with a login page.
- didGenerateResponse:inContext: methods substitute a different object for the response page after a response has already been composed and perform session clean up.