Online documentation - Websydian v6.0

Users Guide | Patterns Reference | WebsydianExpress | Search

 

Implementing Deck Template Generator Functions


Setting up the Deck Template Generation Process

Location of WML Deck Templates

The generated WML Deck Templates are written to a folder named WML. This folder must be located at the same level as the compiled run-time objects, i.e. under the Win32 folder at the same level as the Release folder for AllFusion Plex.

The folder must be created manually prior to the execution of any Deck Template Generator functions.

Specify Path to Dispatcher in AllFusion Plex INI-File

For each WAP Event Handler associated to a Deck Generator function, the generated Deck Template will contain a call to the Dispatcher function of the Websydian WAP application.  The exact location of the WAP Dispatcher function is specified in the AllFusion Plex default execution INI-file, and this location is read during the Deck Template generation.

Example:

If the name of the WAP Dispatcher function file is WapOrders.EXE and it is installed in a WapApplications folder on the HTTP server, then the AllFusion Plex INI-file must contain the following declaration:

[WML]
DISPATCHER_URL=/WapApplications/WapOrders.EXE

The WML go href reference will then be generated as:

<go href="/WapApplications/WapOrders.EXE" method="post">

The name of the AllFusion Plex INI-file is on the form Obvvvxxx.INI, where vvv is the AllFusion Plex version number and xxx is one of the following codes:

The AllFusion Plex default execution INI-file is located in the AllFusion Plex bin folder, e.g. C:/Program files/Ob350/BIN/Ob350rc.ini for AllFusion Plex version 3.5, 32-bit version.

Generate and Build Identify Functions Scoped under the Event Handlers (iSeries Only)

If using the iSeries variant of Websydian and if not already done, also do generate and build the internal IdentifyInputFields functions scoped under each WAP Event Handler function used by the Card Generators or Template function scoped by the Deck Generator.  These Identify functions are called during Deck Template generation in order to identify the input fields specified for each WAP Event Handler function in the WebInput variable.

IdentifyInputFields functions scoped under Event Handlers

The Deck Template Generator function uses IdentifyInputFields functions when building the Deck Template at development-time (for iSeries HTTP server only).

Generate and Build Grid Jump Functions

Jump functions specifying Grid Jumps are called during the Deck Template generation process.  These functions will identify the fields defined in the local WebInput variable of the Jump function.

Therefore, all Jump functions specifying a Grid Jump must be generated and built before running the Deck Template generation.

Generate and Build Deck and Card Template Generators

Each Deck Generator function always has a _DeckTemplateGenerator function scoped under it and each Card Generator function scoped under the Deck Generator has a _CardTemplateGenerator) function.  Generate and build all of these Template generator functions from the Generate & Build window.

Template Generators to be generated and built

Generate the Template Generator functions under the Deck Generator and its scoped Card Generators.

Set Shadow Functions to Implement No

The Deck Template Generator function inherits from the scoping Deck Generator function (in order to get access to the fields of certain variables defined within the Deck Generator).  This means that all functions scoped under the Deck Generator function will also be inherited and scoped under the _DeckTemplateGenerator function.  In the same way, the Card Template Generator functions inherit everything scoped under the Card Generator function.

Shadow functions scoped under Template Generators

Functions scoped under the Deck and Card Generator functions are also inherited by the _DeckTemplateGenerator and the _CardTemplateGenerator functions.  These functions should be ignored.

Important: The inherited ‘shadow’ functions should be ignored - they should not be opened and they should not to be generated.  You may choose to set the functions to implement No.

Run the Deck Template Generator Function

After being generated and built, the Deck Template Generator function can now be run from within the AllFusion Plex Generate & Build window.  The generated Deck Template will now reside in the Wml folder under the Gen library and from here it can be moved to the HTTP server.

Edit the Deck Templates

After the initial generation, a WML Deck Template can be edited in order to enhance the design. Modifying WML Templates may not be as necessary as in HTML where much more visual layout needs to be applied.  Any editor including Web editor tools can be used to edit the Deck Templates, as long as the guidelines below are followed:

  1. Manual changes will be overwritten if the Deck Template is re-generated.  Do always make a copy of the Deck Templates and apply the modifications to these.
  2. Do not alter the replacement markers in the Deck Templates.
  3. On grid pages, the two grid markers (<!--/(Grid)-->) must not be deleted and each grid marker must be on a single line.
  4. If an event (or replacement markers) depends on values calculated during the grid load, this event should always follow the Grid table (see also the Specify Sum Fields for a Grid Page section in the Other Uses page of the Page Generator function).
  5. As opposed to HTML, WML code and keywords are case-sensitive.  Do not use capital letters for WML tags and attributes.

Generated Deck Templates get the file name of the scoping Deck Generator function with a .WML extension.