Websydian v6.1 online documentationOnline documentation - Websydian v6.5

Layout Control Module Parts


The Layout Control pattern itself inherits from the Session Management pattern which has then been modified to provide selection of a Template folder from a Template Code.

Below is a description of the objects in the SessionWithLayoutControl pattern, which have been changed in order to implement Layout Control.

Data

Session

The Session entity has been enhanced with a TemplateCode field.  This field must be set when the Session is created (by the CallFirstPageGenerator function), and it will then be stored with the Session and retrieved by the Page Generators.

Abstract

EventDispatcher

The Dispatcher function stores the value of the TemplateCode field which is read during validation of the Session.  The TemplateCode is stored in internal storage so that it later can be retrieved by the Page Generator without accessing the database.

EventDispatcher.CallFirstPageGenerator

The value of the local Session<TemplateCode> field is passed as a parameter in the call to the CreateSession function.  In order to apply the Layout Control pattern, the value of the local Session<TemplateCode> field must be initialized in the 0 Before calling session creation edit point.

PageGenerator

In the abstract PageGenerator function, the local Document<TemplateCode> field is loaded from the internal storage.  The retrieved Template Code is then used to point to the appropriate Document Template Folder.