Persistate

Common techniques

Hide Navigation Pane

Common techniques

Previous topic Next topic No directory for this topic  

Common techniques

Previous topic Next topic Topic directory requires JavaScript JavaScript is required for the print function Mail us feedback on this topic!  

Using Generator and Configurator is straightforward.  Like all Persistate applications, they are data-centric.  This means that if you want to modify data or perform an operation, navigate to the object or collection that you want to modify or operate on, then modify the object or select the operation which should then be visible in the user interface.

Navigating the persistent tree

To find the object, you use the navigation pane on the left.  Expand the nodes of the tree until you find the object or collection you want, then click on the text of the node.  The object will appear in a pane on the right, as a grid if you selected a collection, or as a form if you selected an object.  For example, the following screenshot shows tree nodes expanded to show the Persistent Class Grid in the Persistate package in the System environment.

Displaying the Persistent Classes grid

Displaying the Persistent Classes grid

This works for all nodes, except the Principals node.  This is because Principals is a collection of many objects, potentially too many to show all at once.  Consequently, when you click this node, the Principals Lookup appears.

Looking up a Principal

Looking up a Principal

To display details of a Principal, enter the principal's identification into the text box and click Search.  You can use the % and _ wildcards to match zero or more characters, or any single character respectively.  When the principal you see is listed, click its Show button to display the Principal Form.  See Common operations for more details on principals.

The tree displayed in the navigation pane is the persistent containment tree for the Persistate package.  This means that it does not show any associated members or collections of the objects that appear in it.  However, these will appear in the forms and grids that are displayed on the right.  Also, some objects, such as the Modules within Packages are deliberately left out of the tree, and appear only in forms.

The above screenshots show only two panes, apart from the menubar, toolbar and status bar.  You can, however, have any number of panes visible.  See Customising the workspace for details on how to do this.  Only one pane is the active pane at any time.  The active pane  is the one with the input focus, and has a highlit title and a coloured border.  In the above screenshot, the pane on the right is the active pane.  The colours will depend on the layout style you have selected.

The Back and Forward toolbar buttons provide the usual functions.  The Parent button will display the parent object of the currently active one in the persistent tree.

Modifying objects

Modifying objects is a simple as clicking in the control displaying the information you want to change, and changing it in the usual way - typing in a text box, dropping down a combo box, etc.  Often fields within forms and grids will be read only, in which case, you will not be able to change the displayed values.  For example, none of the columns in the Persistent Class Grid above are editable, as this information is set directly from the definition file.

When you modify an object, Persistate remembers which objects are modified.  You can see the current count of changes on the right of the status bar.  To save changes to persistent storage, select the Save option.  This is available In the File menu and as a toolbar button.  Usually you do not need to use Save, as it is performed automatically when you execute any operation, including Show (executed every time you display an object or collection) and Exit.

To undo any changes you have made, select the Revert option, available on the File menu.  This undoes only those changes since the last manual or automatic Save.

Future Enhancement

A future version of Persistate will have an undo capability allowing you to roll back operation executions to any point in the current session.  This capability will be contingent on being enabled in the application configuration, and will be available for all Persistate applications, not just Generator and Configurator.

Executing operations

Everything you do in Generator, Configurator and all other Persistate applications is based on operations.  Every menu option or toolbar button is linked to an operation.  Displaying an object or collection is performed by the Show operation.  Even when you modify an object on screen, Persistate starts a Modify operation behind the scenes which is completed when you click Save or just before any other operation is executed.

Most often, operations are executed by the controller module of a Persistate package.  This means that in a Viewer-Server configuration, the operations are executed in the server, even though they are requested in the viewer.  Persistate transfers the operation request to the server to be executed there.  Some operations, however, execute in the user interface, meaning that in a Viewer-Server configuration, they execute in the viewer.  Such operations cannot make any persistent changes, or display any information that has not already been displayed.  Examples are Back, Forward and Apply Style.

You execute operations by selecting them in the user interface.  Often this will be from a menu available on the menu bar at the top of the window, from the toolbar just below it, or from a right click context menu on a form or grid.  You start a Modify operation whenever you edit an object, and you execute a Show operation whenever you click a button or tree node to display an object or collection.  For operations linked to menu items or toolbar buttons, if you hover the mouse over the item or button, a tooltip will show a short description of the operation.  If the item or button is disabled, the tooltip will provide an explanation of why it is disabled.

All operations are supplied with a target object and possibly a target collection.  These depend on which form or grid is showing in the active pane (with the input focus, highlit title and coloured border), and which control within it is active (has the input focus).  If a grid is the active control, the object in the currently selected row is the target object, and the collection showing in the grid is the target collection.  If a control in a form other than a grid is active, then the object showing in the form is the target object, and there is no target collection.

Some operations use the target object and collection, some use one but not the other, some don't use either.  For example the Delete operation deletes the target object from the target collection, New creates a new object in the target collection, Refresh refreshes the value of the target object from persistent storage, and Exit does not use either target object or collection.

Persistate provides a standard set of operations - all of the examples already given above are standard operations.  All Persistate packages can use these standard operations, either keeping the standard implementations of them, or providing their own.   See Standard Persistate operations for a full list of these operations.  The Common operations topic contains a list of operations which are available in both the Generator and Configurator applications.  For those not available in Configurator, see Generator only operations.