Online documentation - Websydian v6.0

Users Guide | Patterns Reference | WebsydianExpress | Search

 

_DocumentTemplateGenerator Function

A _DocumentTemplateGenerator function will be scoped under each Page Generator function in a Websydian application.  These functions contain meta-code to read the definitions of their Page Generator functions and the Event Handlers scoped under the Page Generators and from these definitions they generate Websydian Document Templates.

Document Templates are built and executed at development-time to produce outline Document Templates for the PageGenerator pattern.   The Document Templates are used by the Page Generator functions as the templates from which new HTML pages are generated.

The _DocumentTemplateGenerator pattern calls the IdentifyInputFields function scoped under the Event Handler functions included in the generated HTML page.  The IdentifyInputFields function is used to identify the input fields and the hidden fields in the HTML form on the generated Document Template coming from the scoping Event Handler functions (the fields declared in the local WebInput and Hidden variables of the Event Handlers).

The _DocumentTemplateGenerator should be executed as-is without any modifications.  The generated Document Template is produced in HTML format.

More Information

The Document Template Generators is one of the Websydian main functions.  Read more about the Document Template Generators and Document Templates in generel.

Inheritance

The _DocumentTemplateGenerator function inherits from the PageGenerator pattern.  This inheritance is established in order to make the definitions of local fields applied of the PageGenerator available for the _DocumentTemplateGenerator function.  These definitions are used by the meta-code in the Generator to generate the Document Templates.

The action diagram code from PageGenerator is not inherited; the two functions do not share the same overall template.

The inheritance also implies that the _DocumentTemplateGenerator function inherits any function scoped under the Page Generator function:

Dummy functions scoped by Document Template Generator

Event Handler functions (and their scoping functions) scoped under the Page Generator are also inherited by the _DocumentTemplateGenerator function.  These functions should be ignored.

These inherited Event Handler functions should be ignored - they should not be opened and they should not be generated.  You may choose to set the functions to implement No.