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

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 CA Plex.

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

Specify Path to Dispatcher in CA 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 CA 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 CA 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 CA Plex INI-file is on the form Obvvvxxx.INI, where vvv is the CA Plex version number and xxx is one of the following codes:

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

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 CA 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.