The psPage object is a global object that resides on the server for 4GL JSP targets. It controls the event model and encapsulates the server-side object model, including a representation of all the form controls in the object model. You must enable the 4GL Web server-side event model in order to create the psPage object.
psPage property |
Datatype |
Description |
---|---|---|
errors[ ] |
Vector |
The Vector datatype is a collection of PageError objects. PageError is a value class with 3 string attributes: location, cause, and message. |
showErrorsOnPage |
boolean |
Specifies whether errors contained in the errors[ ] array are displayed on the page when the page is generated. |
showErrorsAtTop |
boolean |
Specifies whether errors are displayed at the top or the bottom of the page. |
showErrorsInAlert |
boolean |
Specifies whether errors are displayed in a client-side alert box after the page has completed loading. |
pageName |
String |
The current name of the page. |
firstTime |
boolean |
Indicates whether this is the first time the page was called. |
hadValidationError |
boolean |
Indicates whether a validation error occurred. If an action fails validation and then you change this property to false, the action will occur despite the validation error. |
didRedirect |
boolean |
Indicates whether psPage.Redirect has been called. If it has, generation will not occur. |
doTrace |
boolean |
Indicates whether tracing is enabled. This can be used in the code to check before calling the Trace method multiple times. This property is obsolete. For JSP targets, use the SetTrace and IsTrace methods. |
Properties you should not change Changes to the firstTime, hadValidationError, and didRedirect property values are generated dynamically. It is not recommended that you change these values directly in code.
psPage event |
Occurs |
Order of occurrence |
---|---|---|
At the beginning of a request |
1 |
|
The first time a page is loaded |
2 |
|
Just before binding starts |
3 |
|
To allow whole page validation |
4 |
|
If any validate on the page fails |
5 |
|
Just after binding completes |
6 |
|
Just before the action is performed |
7 |
|
Just after the action is performed |
8 |
|
Just before the page is generated |
9 |
|
After all generation is complete |
10 |
|
After all generation is complete |
11 |
|
When ReportError() is called |
When invoked |
Validation and ItemChanged events for controls on the page occur between the psPage BeforeBinding and AfterBinding events. ServerAction events for controls on the page occur between the psPage BeforeAction and AfterAction events.
psPage method |
Description |
---|---|
Causes client-side alert box to display when the page is finished loading |
|
Indicates whether tracing is enabled |
|
Redirects the client's browser to another page |
|
Indicates whether a server-side error has occurred |
|
Turns tracing on and off |
|
Tests for errors on EAServer component methods |
|
Adds a message to the internal trace buffer |
|
Increases the indent level to indicate nesting |
|
Decreases the indent level to indicate nesting |
|
Writes current errors at the current place in the page |