Try OpenEdge Now
skip to main content
Developing WebSpeed Applications
Controlling WebSpeed Transactions : Transaction control with HTML-mapping Web objects : Anatomy of process-web-request in HTML-mapping
 

Anatomy of process-web-request in HTML-mapping

The heart of an HTML-mapping Web object is process-web-request. The following figure shows how the default HTML-mapping version of process-web-request participates in a Web request.
This default model can apply whether the Web object is accessed by its URL from the browser or is called directly from another Web object. (The STEP numbers are taken from the default comments in the procedure.)
Each box represents a method procedure, database action, or one of several event procedures that provides a basic request service:
*outputHeader — The method procedure that outputs the HTTP header.
*inputFields — An event procedure that moves all the HTML form element values received in a request to the corresponding field objects in the Web object. These field objects are initially defined by TagExtract when you create the Web object in the AppBuilder.
*FIND/CREATE database record — This is the standard point at which you might find or create a database record. This record provides the data for field objects mapped to database fields.
*assignFields — An event procedure that moves the values for update in the field objects to the corresponding variables and database fields in the Web object.
*displayFields — An event procedure that moves the values in variables and database fields to the corresponding field objects in the Web object.
*enableFields — An event procedure that makes some field objects sensitive to user input on the Web page. The value of any disabled field object mapped to HTML <INPUT> tags of type TEXT, HIDDEN, or PASSWORD becomes straight text in the output HTML, and does not return as input in the next request. Form element types for all other disabled field objects appear enabled, but their values do not get assigned by assignFields.
*outputFields — An event procedure that outputs a Web page to the Web server, merging all the field object values with the Web page according to the tags that are mapped to the Web object. This includes the handling of custom tags as well as form element tags. (The Web object reads the offset file at this point to merge data into the original HTML file that was used to generate the HTML-mapping Web object.)
Figure 13. Standard HTML-mapping process-web-request model
Note: Step 4.1 is missing in the figure above. In the actual code (install-path/src/web2/template/html-map.w), this step describes how to simulate a Web request by calling another Web object. This is not a common action.