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.
When a browser requests a page, the JSP application server processes a 4GL JSP page in this order:
Starts page processing
Initializes and restores page variables and parameters
Creates the server object model
Performs page-specific processing
Validates the page and binds input data if data is submitted to the current page (typically in preparation for redirection to another page)
Binds values for EAServer component properties to controls
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:
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 |
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 |
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 |