Online documentation - Websydian v6.0 |
Users Guide | Patterns Reference | WebsydianExpress | Search |
Introduction Implementing Other Uses Valuespace Access Background
The Virtual Template contains a structure of name/Replacement Marker pairs. During page generation (Valuespace generation), the Replacement Markers will be substituted and the result will be the data input for the Valuespace object being a structure of name/value pairs.
ValueSpace
SUBENTER "Main"
SUBENTER "WsyGrid"
/(Grid)
SUBENTER (i) ( i = 1, 2, 3, )
FLDX, /(FLDX) (Implementation names of fields in WsyGrid)
FLDY, /(FLDY)
FLDZ, /(FLDZ)
SUBENTER "InternalFieldValues"
FLDE, /(WSYDHIDDEN)/(FLDE) (Impl names of Grid status fields)
FLDF, /(WSYDHIDDEN)/(FLDF)
SUBEXIT
SUBENTER "EventSignatures"
FNC1, /(WSYD_SIGN)/(FNC1) (Impl name of Grid Event Handlers)
FNC2, /(WSYD_SIGN)/(FNC2)
FNC3, /(WSYD_SIGN)/(FNC3)
SUBEXIT
SUBENTER FNCv
/(FNCv) (Impl name of Grid Child functions)
SUBEXIT
SUBENTER FNCw
/(FNCw)
SUBEXIT
SUBEXIT
/(Grid)
SUBEXIT
FLDA, /(FLDA) (Implementation names of fields in WsyDetails)
FLDB, /(FLDB)
FLDC, /(FLDC)
SUBENTER " InternalFieldValues"
FLDL, /(WSYDHIDDEN)/(FLDL) (Impl names of Details status fields)
FLDM, /(WSYDHIDDEN)/(FLDM)
SUBEXIT
SUBENTER "EventSignatures"
FNC7, /(WSYD_SIGN)/(FNC7) (Impl name of Details Event Handlers)
FNC8, /(WSYD_SIGN)/(FNC8)
FNC9, /(WSYD_SIGN)/(FNC9)
SUBEXIT
SUBENTER FNCd
/(FNCd) (Implementation name of Details Child functions)
SUBEXIT
SUBENTER FNCe
/(FNCe)
SUBEXIT
SUBEXIT
The Virtual Template as well as the generated Valuespace are represented as simple string values by the Page Generator. Both strings contain a number of control codes which are not included in the illustration above.
Subspaces are used to group the different sections of the Valuespace.
EventSignatures subspaces are only generated when inheriting from the Signature patterns.
Generating an HTML page by a Websydian Page Generation using Server-Side Scripting can be viewed as a 3-step process:
The first step is generation of a Virtual Template for the Valuespace string (see structure of Virtual Template in section below). The Virtual Template string is generated and stored internally by the Page Generator and it is provided as input to the Page Generator function instead of a Document Template read from a file.
The Virtual Template reflects the structure of the Valuespace object to be generated (see steps below) containing replacement markers to be substituted. In this way, the Virtual Template contains a structure of name/Replacement Marker pairs.
During generation of the Virtual Template, Child functions are detected and a Page Marker code is inserted in the Virtual Template for each Child function.
As the second step the Page Generator now uses the Virtual Template as input for its substitution process hereby replacing Replacement Markers with WsyDetails and WsyGrid field values.
When a Child Page Marker is met in the Virtual Template, the Child Page Generator function is called and the sub-Virtual Template part generated by the Child function is merged to the Parent Valuespace string.
When the Valuespace string has been generated, the string is posted to the Script Server and the Script Template on the Script Server is initiated.
The third step is performed on the Script Server where the Valuespace string is retrieved, the Script Template is started/called, and the Valuespace string is then stored in an internal Valuespace data structure (accessible from the Script Template).
The Script Template (generated by the Document Template Generator) will contain the needed references to the Valuespace object, and the result of the evaluation of the Script Template will be the complete HTML page containing the specified data values.
Finally, the generated HTML page is sent back to the web user.