Online documentation - Websydian v6.0

Users Guide | Patterns Reference | WebsydianExpress | Search

 

Page Generator with Error List Parts


PageGeneratorWithErrorList

The PageGeneratorWithErrorList function pattern specifies a call to the HtmlChildErrorPage as a part of the HTML page generation.

A Page Marker is inserted into the generated Document Template by the scoped _DocumentTemplateGenerator function to specify exactly where in the template to insert the Error List.

Implemented Page Generator functions in a Websydian application may inherit from the PageGeneratorWithErrorList pattern and hereby be able to generate an Error List as part of the page.  For Event Handlers doing validations, it is then necessary to replace references to the ErrorPage function by the PageGeneratorWithErrorList function.

The PageGeneratorWithErrorList function defines an ErrorMode input field which is used by the function to determine whether the Error List should be included in the page or not.  An actual parameter value must be specified for all calls to Page Generators based on the PageGeneratorWithErrorList pattern.

When an HTML Page is generated in Error mode (ErrorMode = *Yes), default field values on the generated page are set from the values received from the Event Handler causing the error.  In this way, the previous user values and hidden field values will be repeated on the page.

HtmlChildErrorPage

The HtmlChildErrorPage function is called by the PageGeneratorWithErrorList pattern and the function itself inherits from the ErrorPage function and the ChildPageGenerator pattern.  In this way, the HtmlChildErrorPage function will output any messages in the Message List and empty the list.

Before implementing any Page Generator functions based on the PageGeneratorWithErrorList pattern, the HtmlChildErrorPage function and its scoped Document Template Generator must be generated and built and the Template Generator must be executed.