Taking values from the request – Apple WebObjects 3.5 User Manual
Page 73

How WebObjects Works—A Class Perspective
73
HTTP server and the WOApplication object. The application first parses
the command line for the specified adaptors (with necessary arguments); if
none are specified, as happens when the application is autostarted, it creates
a suitable default adaptor.
The
run
method initiates the request-response loop. When
run
is invoked,
the application sends
registerForEvents
to each of its adaptors to tell them to
begin receiving events. Then the application begins running in its run loop.
The autorelease pool is released and recreated immediately before the
run
message is sent. Releasing the autorelease pool at this point releases any
temporary variables created during initialization of the application class.
Creating a new autorelease pool before sending
run
ensures that all variables
created while running the application will be released. The last message
releases the autorelease pool, which in turn releases any object that has
been added to the pool since the application started running.
In the rest of this section, we look at what happens during one complete
cycle of the request-response loop.
Taking Values From the Request
The first phase of the request-response loop (see Figure 19) synchronizes
the state of the request component with the HTML page as submitted by
the user. In this phase, the appropriate dynamic elements extract the values
that users enter and the choices they make in the request page and assign
them to declared variables.
For example, if the user clicked a checkbox, the dynamic element that
represents that checkbox must be set to the “checked” state. In other
words, the
checked
attribute of the appropriate WOCheckbox dynamic
element must be set to YES.