Documentation Archive Developer
Search
Table of Contents Previous Section

Assigning Input Values

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. Here is the basic sequence of events in preparing for a request:

  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".

Table of Contents Next Section