Web Connection User's Guide


Retrieving form data

The Form Data part is a nonvisual part that holds the values entered by the user in an HTML form and submitted as part of a request. These fields appear as attributes on the Form Data part. When a Web Connection part is accessed by a request that includes form data, these attributes provide your application with a way of accessing the data for processing.

In order for the Form Data part to have the correct attributes, you must indicate what form the request will come from. To do this, you specify the VisualAge part that defines the form. The Form Data part uses the specified part as a template for its attributes.

When a user fills in a form on a page and presses a submit button, the browser sends all of the form data to the server. On the server, the program specified by the form receives the form data by way of the Web server interface. In the case of Web Connection, WSI is the server program; instead of processing the form data itself, it sends it to the WSI Smalltalk server process running in the VisualAge image.

The WSI Smalltalk server process receives several pieces of information from WSI:

When the WSI Smalltalk server process receives the request, it opens the part specified in the request. (This part will usually generate HTML to be sent back to the browser, but not until after the request has been fully processed.) If the part contains a Form Data part that matches the incoming form data, the WSI Smalltalk server process makes the incoming form data available through the attributes and events of the Form Data part.

By connecting to these attributes and events, you have access to all of the values that the user specified when submitting the request. In addition, Form Data provides several events that you can use to trigger actions in your part.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]