How page request processing works

When processing a 4GL JSP page, the Web Target object model calls events for the psPage object in a specified order. The psPage global object controls the event model and the communication between pages.

Sequence for processing pages

When a browser requests a page, the JSP application server processes a 4GL JSP page in this order:

  1. Starts page processing

  2. Performs page-specific processing

  3. Generates the new page

The following tables summarize the processing of 4GL JSP pages and show the order in which server-side events are triggered during that processing:

Table 9-9: Order of events at the start of page processing

Page processing

Events

Initiate page request

psPage.RequestStart

First page request

psPage.FirstTime

Reload page with data submitted to the reloaded page (typically in preparation for redirection to another page)

psPage.BeforeBinding

Table 9-10: Order of events that perform page-specific processing

Page processing

Events

A control had a specified value on request and the value of that control changed

control.Validate

The validation fails

control.ValidationError

The validation succeeds

control.ItemChanged

Data binds to component properties; sets the value of the property of a corresponding EAServer component (for each server object)

none

Validate page

psPage.Validate

The page or any control on the page fails validation

psPage.ValidationError

Binding and validation complete

psPage.AfterBinding

Page control initiates a form submit

psPage.BeforeAction

control.ServerAction

psPage.AfterAction

For a first request or for pages that require data binding, sets the value of the property of a corresponding EAServer component (for each server object)

none

Table 9-11: Order of events that generate the new page

Page processing

Events

If the script does not redirect to another page, process the page template as before. Include other server scripts.

psPage.BeforeGenerate

If the script does not redirect to another page, generation is complete.

psPage.AfterGenerate

Generation is complete. This event is always triggered.

psPage.RequestFinish