Generating the response – Apple WebObjects 3.5 User Manual
Page 80

Chapter 5
WebObjects Viewed Through Its Classes
80
message and invoke the appropriate action method in the request
component. This action method returns the response page.
To be suitable, an element must be able to respond to user actions (a
WOSubmitButton or a WOActiveImage, for example). Each of these
elements evaluates the invoked action to determine if it “owns” it.
For more on how components are associated with templates and on how HTML
elements participate in request-handling, see “How HTML Pages Are
Generated” (page 82).
Generating the Response
In the final phase of request-response loop (see Figure 24), the response page
generates an HTTP response. Generally, the response contains a dynamically
generated HTML page. Each element (static and dynamic) that makes up the
response page appends its HTML code to the total stream of HTML code that
will be interpreted by the client browser.
Figure 24. Generating the Response
Here is the basic sequence of events for generating a response:
Application
Session
Response Page
Page Template
appendToResponse:
inContext:
appendToResponse:
inContext:
Gets response appendToResponse:
page and stores inContext:
reference to it.
Gets template for
page
appendToResponse:
inContext:
Dynamic and static
HTML elements
append their content
to response.
Sends sleep
to all "
awake"
components
’
’
’
’
’
dealloc
Completes response
saves page.
Saves session
sleep
’
’
’
dealloc
sleep
’
’
’
’
’
dealloc