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

Implementing Jump Functions

Specify Jump Function

A Jump function is specified by inheritance from the Websydian Jump pattern.  In addition, the WML Card being jumped to needs to be specified by a calls-triple to the corresponding Card Generator function.

MySourceCard includes FNC MyGridJump
MySourceCard.MyGridJump is a FNC Jump
calls FNC MyTargetCard

Specify Name of Jump

The Jump function will result in an action in the generated Deck Template.  The WML name as well as the label of this action will by default be set to the object name of the Jump function.  This name may be overwritten by specifying a FNC name NME triple:

MyCard.MyGridJump name NME Update

By the name-triple specified above, the name of the resulting action (object name as well as label) in the generated Deck Template will be changed to Update instead of MyGridJump.

Capture WML Variables for Grid Jumps

Jump functions specified for Grids are implemented as Link cells for each row in the Grid (in the same way as with WAP Event Handlers).

When selecting a Jump in a Grid (by following the link), one or more of the fields of the selected Grid row must be captured in WML variables so that they can be used in the subsequent processing (e.g. as parameters transferred to WAP Event Handlers later in the flow).  The Grid fields to be captured by WML variables are specified as local fields in the WebInput variable of the Jump function:

MyGridJump option NME
...value SYS
WSYD Grid event
Yes
local FLD
...for VAR
FieldA
WebInput
local FLD
...for VAR
FieldB
WebInput

In the example above, MyJump is defined as a Grid Jump and the FieldA and FieldB fields are captured in WML variables.  The two fields must also be defined in the WsyGrid variable of the Card Generator containing the Jump function.

The WebInput variable should only be populated for Grid Jumps - specifying fields in this variable will have no effect for Details Jumps.

The target Card being jumped to must have its NewContext option set to No.  Otherwise, the Card being jumped to will clear all WML variables.