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

InsertDeck Function

InsertDeck is a Deck Generator utility pattern designed to implement the creation of a database record.  InsertDeck corresponds to the WebInsertPage pattern for HTML development, and when applied the UIBasic.Insert and UIBasic.Detail views need to be replaced with the database view on which the insertion is done.

The InsertDeck pattern contains an InsertCard Card Generator function scoping an Insert WAP Event Handler (and a disabled Back Jump function).

Example:

MyInsertDeck is a FNC InsertDeck
replaces VW
...by VW
UIBasic.Insert
MyEntity.Update
replaces VW
...by VW
UIBasic.Detail
MyEntity.Update
replaces FNC
...by FNC
ErrorDeck
MyErrorDeck
MyInsertDeck.InsertCard name NME Create MyEntity
MyDispatcher calls FNC MyInsertDeck.InsertCard.Insert

By default, the Insert Deck will be called again after the Insert WAP Event Handler has been triggered.  To overwrite this call, add an +++Undefine Subroutine statement followed by a call to the alternative Deck Generator function in the Start call InsertDeck generator edit point.