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:
- The application object sends takeValuesFromRequest:inContext: (in Java, takeValuesFromRequest) to itself; its implementation simply invokes the session object's takeValuesFromRequest:inContext: method.
- The session sends the takeValuesFromRequest:inContext: message to the request component.
- 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.
- 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.
Table of Contents Next Section