Workbench User Guide : Generating Frames from Predefined Templates : The active_display Template : How You Can Use an Active Display Frame
 
Share this page          
How You Can Use an Active Display Frame
To use the Active Display frame, you must first apply the Display from User Class facility, one of the Insert options on the Frame Editor’s floating menu bar. You use this facility to create a display based on the user class you want the end user to work with.
After you have done this, save the frame. You can now run it directly (or call from other frames), and all the built-in functions will work.
Active Display Elements
Each Active Display shows the principal elements of the business class object that the display frame is mapped to:
The simple single-valued attributes such as id, name, and place
The complex attributes that are themselves business items with their own attributes, such as Country in the following example
The complex attributes that are sets of business items, such as Airlines and User profiles, and the Routes from and to the displayed Airport in the following example
If the business class being displayed was itself generated using the Insert from Database Table option in the Class Editor, the simple attributes will have been assigned to categories during generation, and the display will have grouped them into separate category panels. (In the following example, the top-left panel contains identifier attributes; the panel below it contains location attributes.)
The generated display is designed for simple editing, including the following options:
Deleting a button or a data field will in most cases remove visibility of that function or data element; everything else will still work.
Adding data fields that correspond in name and type to currently undisplayed attributes of the business item will cause them to be automatically populated with no change in code required.
Adding named fields that do not correspond to business item attributes will not destabilize the frame. You may use these and code for them as required.
The frame code can be added to, deleted, or replaced to enhance, suppress, or change functionality.
Active Display Functions
Active Display frames provide a number of key functions as menu options. They are available from the File menu (these options are also available as toolbar icons), from tablefield controlbutton menus, or from popupbutton menus in each of the panels that display items linked to the principal business item in the display.
Active Display frames provide a standard File menu, with options for the following:
Opening a set of existing items (userclass objects) populated from records stored in the database
Clearing the set of items (the database is unchanged)
Adding a new item to the set for the user to define its properties
Stepping through the set in both directions
Recording details of the currently displayed (new) item in the corresponding database table
Saving changes made to the currently displayed item in the corresponding database table
Deleting the currently displayed item from the display and the database
Active Display frames provide an icon for each tablefield, with menu options for the following:
Opening selected items from the tablefield in a new frame for editing
Opening selected items from the tablefield in a series of summary display frames for read-only viewing
Inserting a new item for the user to define its properties
Deleting selected items or all items
Hiding (temporarily) and unhiding items
Cutting, copying, and pasting selected items
Enabling and disabling multi-item selection
Copying the tablefield data contents as text to the clipboard
Active Display frames provide an icon for each item-attribute panel, with menu options for the following:
Opening selected items from the tablefield in a new frame for editing
Opening selected items from the tablefield in a series of summary display frames for read-only viewing
Inserting a new item for the user to define its properties
Deleting selected items or all items
Hiding (temporarily) and unhiding items
Cutting, copying, and pasting selected items
Enabling and disabling multi-item selection
Copying the tablefield data contents as text to the clipboard
Active Display Toolbar
A toolbar consists of a set of iconized items from which the user makes a selection by clicking the mouse pointer on it. Toolbar items typically consist of buttons that provide shortcuts for frequently used menu commands or for easy access to other features or frames.
The built-in toolbar of the Text Editor frame contains the following segments:
The first segment contains buttons for the Clear and Open commands on the File menu.
The Open button, when right-clicked, displays two dropdown menu items:
All records—Clicking this is identical to clicking the Open button.
Selected record—Clicking this opens a scrollable selection list. Double-clicking any item in this list populates the display with that item's details.
The second segment contains a button group for Add, Delete, and Edit on the File menu.
The third segment provides navigation buttons for Next and Previous on the File menu, as well as First and Last and New. It also displays the number of records in the set and the index of the current item displayed; you can overtype this to jump directly to any item in the set.