Sections

A generated page has many different operations to perform. It is split into various sections to handle this.

Each section is of one of four types:

The main page sections that you need to know are: PR_Setup and PR_Init

The main form sections that you need to know are: PR_FormPassed, PR_FormPassedNew and PR_FormPassedOld.

Every component runs in a default section. As a generalisation, you do not need to specify a section when you use a component. However, in some cases, you may want to over-ride the order of processing, in which case you should specify the section when you use the component.

Page sections

The sections are described in the order that they appear on the page.

 

Section NameTypePurpose
PR_Setup PHP Code to initialise variables, retrieve Recordsets from the cache using the GetRecordset method of Manager etc.
PR_NoTrans PHP Used to insert code to be executed in the event of no transaction.
PR_AfterProcess PHP Used to insert code run to be executed regardless of whether there is a transaction or not.
PR_Init PHP Used for loading data into recordsets, defining search criteria are and putting information into the State.
PR_DisplayStart HTML Denotes the beginning of HTML markup.
PR_DisplayHead HTML Used for putting HTML in between the <head> and </head> tags.
PR_DisplayJava HTML Used for inserting JavaScript to be executed before the page is displayed.
PR_DisplayJavaUpdate HTML Used for runtime JavaScript field update functions.
PR_DisplayHeadEnd HTML Used for putting HTML in just before the </head> tag.
PR_DisplayBody HTML Used for putting HTML in between the <body> and </body> tags. Any HTML here is also written to the template file.

The Display_Template component handles the writing and reading in and parsing of template files.

PR_DisplayJavaTail HTML Used for inserting JavaScript to be executed after the page is displayed.
PR_DisplayBodyEnd HTML Used for putting HTML in just before the </body> tag.

Form sections

These sections are repeated for every form in the page.

 

Section Name Type Purpose
PR_FormStart Form A page can have many forms, but only one can be submitted. This section determines if it was this particular form that was submitted.
PR_FormValidateField Form Used to insert code to be executed in order to validate a field. If there is more than one row to be validated, this code is looped around in order to validate the field for all the rows.
PR_FormValidateRecordset Form Used to insert code to be executed in order to validate a property of an entire recordset.
PR_FormValidateForm Form Used to insert code to be executed in order to validate a property of a form.
PR_FormAfterValidation Form Used to insert code to be executed regardless of whether form validation succeeded.
PR_FormPassedStart Form Test to see if form passed validation, and used to insert code to be executed if this is so.
PR_FormReadValues Form Reads all values submitted from the form into the recordset.
PR_FormPassed Form Used to insert code to be executed if the form has passed validation.
PR_FormPassedNew Form Used to insert code to be executed if the form has passed a validation, and this transaction has not been seen before.
PR_FormPassedOld Form Used to insert code to be executed if the form has passed a validation, and this transaction has been seen before.
PR_FormFailed Form Used to insert code to be executed if the form did not pass validation.