Online documentation - Websydian v6.0 |
Users Guide | Patterns Reference | WebsydianExpress | Search |
Introduction Implementing Other Uses Background
In Websydian for WAP there is a difference between replacement markers and user input fields specified by WML variables.
Replacement markers are substituted by the Deck Generator and Card Generator functions at the time that the WML Deck is generated at the HTTP Server, and as such the replaced field values will appear as constants in the generated Deck Generator. Replacement markers are specified in the Deck Templates for each field in the WsyDetails and WsyGrid variables specified in the generator functions.
User input fields (see below) are initialized from replacement markers and hidden input for WAP Event Handler functions are also represented directly in the Deck Templates as replacement markers.
WML Variables are used to implement data entered or selected by the user, and WML variables set in a previous Card or action are substituted by the WAP browser when a new WML Card is displayed or an action is selected. For each local field declared in the WsyUserInput of a Card Generator function, a WML input field will be present in the Deck Template capturing the entered value in a WML variable (see the Specify Input Fields in Card section in the Implementing Card Generator Functions page).
Values are also assigned to WML variables for each local field specified in the WebInput variable of a Grid Jump function (see the Capture WML Variables for Grid Jumps section in the Implementing Jump Functions page).
When specifying a design with multiple Cards in a Deck, it may be necessary to display user values entered or selected by the user in a previous Card. Displaying WML variables is done by specifying the corresponding local fields in the WsyUserOutput variable of the Card Generator function (or the Card Template Generator function). See also the Displaying WML Variables section in the Other Uses of the Card Generator page).
Generation of WML Deck Templates in Websydian is performed by the Deck Template Generator function scoped under the Deck Generator function. The Deck Template Generator itself only generates the Header and the Template section of the Deck Template, and it then calls the Card Template Generators scoped under Card Generator functions to generate the Card portions of the Deck Template.
The Card Template Generators are internal functions and each Card Template Generator generates the WML code for a single Card in the Deck Template. The result of the Deck generation process is a single WML Deck Template as illustrated in the figure below:
The Deck Template Generator calls Card Template Generators in order to generate the WML Deck Template. The result is a single Deck Template document.
In order for the Deck Template generation process to work, the Deck Generators, Card Generators, WAP Event Handlers and Jump functions must be organized in a certain way (corresponding to the syntax of the WML language):
In order for the Deck Template Generator to work, Card Generator functions must be scoped under the Deck Generator and WAP Event Handlers and Jump functions must be scoped under a Card Generator.
Card Generators must be scoped under Deck Generator, also if the Deck only contains a single Card. Like in Websydian for HTML, Shared WAP Event Handlers can be specified for Card Generators and Template functions by the FNC comprises FNC triple.