Documentation Archive Developer
Search
PATH  Documentation > WebObjects 4.5 > WebObjects Developer's Guide


Table of Contents Previous Section

Taking Input Values From a Request

At this point, the application, session, and component objects have been created (if necessary) and awakened so that they are ready for the request. The next step is to extract user-entered values and assign them to variables. The application checks the WORequest object to see if it contains any user-entered values. If so, the following basic sequence of events takes place:

  1. The application object sends takeValuesFromRequest:inContext: (in Java, takeValuesFromRequest) to itself; its implementation simply invokes the session object's takeValuesFromRequest:inContext: method.

  2. The session sends the takeValuesFromRequest:inContext: message to the request component.

  3. The component, in its implementation of takeValuesFromRequest:inContext:, gets its template and forwards the message to the template's root object. A template is an object graph that represents the static HTML elements, dynamic HTML elements, and subcomponents that together compose the page associated with a component instance.

  4. All dynamic elements in the page template and in the templates of subcomponents receive the takeValuesFromRequest:inContext: message. If one of these elements "owns" a user-entered value, it responds to the message by storing the value in the appropriate variable defined in the request component's declarations file.
For more on how components are associated with templates, and on how HTML elements participate in request-handling, see "How HTML Pages Are Generated".

This step takes place only if the request has input values. If the request does not have input values, takeValuesFromRequest:inContext: is not performed.

Table of Contents Next Section