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

WsyStructure Parts


This page gives a short description of the new objectcs applied to the BSTRUCTURE/_Structure pattern in order to implement the WsyStructure pattern.

ExpandedLink Entity

The ExpandedLink entity keeps track of which Nodes in the Structure that have been selected.  In the default implementation, an ExpandedLink record will exist for each Node in the selected Menu path (for each user session).

By the ExpandedLink entity, the data structure of the WsyStructure pattern has been prepared for more advanced menu structures than the default Menu list (e.g. a tree structure).

Owned by Session A set of ExpandedLink records always belong to a specific User Session.
Owned by Link (optional) This relation describes a relation to the Child Node referred by the Link record.  A Node may occur several time in the structure and by relating to a Link, the Node reference will be unambiguous.

The relation is optional because the ExpandedLink record representing the Root Node (must always be present) will have a blank Link reference.

Has DisplayLevel The DisplayLevel field indicates at what level in the structure that the expanded Link (Node) is on.  The DisplayLevel of the root Node is always set to 0.

If a higher level Node is selected in the Menu list then all ExpandedLink records with a higher DisplayLevel count will be deleted (for the Session).

Has derived NodeDisplayName This derived field has been specified in order to make it easier to implement the WsyStructure pattern.  The field is used to display the Node names in the Menu list and all the developer needs to do, is to complete the pre-defined derivation function assigning a value to the NodeDisplayName field.  Usually, this field will be assigned a value from one or more description fields virtualized from the Node entity.
Refers to Node Redundant relation pointing to the Child Node of the referred Link record.  This relation has been defined in order to get faster/direct access to the related Node entity, and in this way the relation can be used for defining virtual fields from the Node.

No cascade deletion functionality has been defined for any of the entity relations on the ExpandedLink entity.

Web Functions

3 Page Generation functions are scoped under the WsyStructure.Web function suite:

StructureFrameSet Function

The StructureFramSet function specifies the frame set consisting of a Menu list and a Node list.

The key of the Node entity is input to the Page Generator specifying the selected Node.

MenuList Function

The MenuList Page Generator function generates the Node path to the selected sub-Node.  In this way, the first Node in the Menu list will always be the Root node of the structure.  The Node names displayed to the user are displayed by the NodeDisplayName derived field.

The MenuList Page Generator includes a Select Grid Event Handler, and when this Event Handler is selected one of two actions is performed.  If the selected Node is a parent Node containing child Nodes in the structure, these child Nodes will be displayed in the Node list generated by NodeList Page Generator function generating the other frame.  If the Node is a leaf node containing no children, another page must be generated typically showing some kind of Node details or a sub-list of other records related to the Node.

In both cases the entire frame set is reloaded when selecting a new Node in the Menu.

With this design, only one branch in the structure can be seen at a time.  This is as opposed to a 'tree structure' where several branches may be displayed at the same time.

NodeList Function

The NodeList Page Generator function generates a sub-list of child Nodes for a selected parent Node in the Node structure.  The NodeList function comprises the Select function scoped under the MenuList function making it possible to navigate down the Node structure.

Enhancement of Document Template Generation

The following modifications and enhancements have been applied to the Document Template generation implemented by the Document Template Generators scoped under the three Page Generator functions:

By these enhancements, the basic functionality of the inherited Structure web functions will work without any modifications to the Document Templates.