skip to main content
OpenEdge Development: AppBuilder
Control Objects : SmartPanels
 
SmartPanels
A SmartPanel is a task‑oriented array of buttons that incorporates ADM Smart technology. As is true of all SmartObjects, SmartPanels are modular and communicate with other SmartObjects through SmartLinks. SmartPanel instances are immediately available as precompiled objects from the Object Palette. They are loosely coupled to the SmartObjects they control and, because they are not directly involved in the operation of a data stream, are not based on a master object.
Table 13 describes the predefined SmartPanels for your use.
 
Table 13: SmartPanels options
Style
Description
Navigation (with Icon Labels)
A four‑button array with iconic labels that follow the arrowhead convention made familiar by tape recorders and VCRs. The four buttons select, respectively:
*The first record in a data stream
*The record immediately preceding the current record, if possible
*The record immediately following the current record, if possible
*The final record in the data stream
Navigation (with Text Labels)
The same four‑button array, but with text (First, Prev, Next, Last) rather than icon labels.
Update (Standard)
A six‑button array with text labels. The six buttons are Save/Update, Reset, Add, Copy, Delete, and Cancel.
You must use this SmartPanel, or the equivalent buttons in a SmartToolbar, to enable changes to the database when using a SmartDataViewer for data display. You do not need it to make simple updates when using a SmartDataBrowser; a SmartDataBrowser that allows update will automatically perform the update when the user leaves the changed row. Use an Update SmartPanel with a SmartDataBrowser if you want the user to be able to add and delete records, or make more sophisticated updates.
Commit
A two‑button array used for transaction processing. The two buttons are Commit and Undo.

A transaction is any group of operations that must be completed or discarded as an atomic unit. Failing to treat a transactional group atomically generally results in logical rather than physical data corruption. For example, after a credit purchase, successfully updating the inventory and shipping queue without also updating the customer’s balance will cause an inventory leak. In this example, an update must be performed on all of the tables or on none of them, if the system is to remain in good order.
Note: A SmartDataBrowser provides it’s own navigational interface with the scroll bar. Adding a navigation array creates the possibility of confusion: since the SmartPanel is not able to communicate with the scroll bar, they can get out‑of‑sync. If you choose to add a SmartPanel for navigation, consider turning off the scroll bar in the property sheet for the browse widget.
Creating and configuring a SmartPanel instance
After you determine which SmartPanel will meet your needs, creating a SmartPanel is quite easy.
To create a SmartPanel:
1. Right-click SmartPanel in the Object Palette.
2. Select the SmartPanel you want from the context menu:
3. Position the mouse cursor over a bare spot in your workspace and click to place the object. If you have other SmartObjects in place, AppBuilder might open an Advisor dialog box and offer to create SmartLinks. Examine the offer and accept it if the proposed SmartLinks seem appropriate.
4. Right-click the instance and choose Properties from the context menu. The Property Sheet dialog box appears. The sheet for the iconic Navigation panel is shown here:
5. Change the object identifier to one that more accurately describes the role of this SmartPanel in your application.
6. The properties for appearance and behavior vary from panel to panel. Click the Edit button to inspect them (you can also reach them directly by choosing Instance Properties from the menu‑button menu). Change those that do not meet your needs.
Navigation SmartPanel properties
A Navigation SmartPanel has three properties. You can change those that do not meet your needs:
*Show Border — Normally set. Clearing this check box turns off the border (implemented as a rectangle) around the buttons.
*Edge Pixels — Normally 2. You can set the value to as much or as little as you like, with differing visual effects. Note that the number of pixels between the edge of the button and the inner edge of the rectangle does not change—the rectangle’s border grows inward toward the buttons rather than outward, in other words.
*Internationalization — (Applies only to the iconic Navigation panel.) To conform your software to cultural conventions, you can choose which button—leftmost or rightmost—will set the pointer to the first record in a data stream. You can often determine the convention for a particular culture by looking at the direction in which the local language is written and read.
Save/Update SmartPanel properties
A Save/Update SmartPanel has only two properties. Change either or both, as desired:
*TableIO type — Normally Save. Setting this option to Update requires the user to first click Update before the fields will make themselves editable.
Save causes the fields to be editable by default. In either case, once the user has edited a field, choosing the Update button (now labelled Save) writes the changes back to the database immediately. If you also have a transaction (Commit/Undo) panel installed, your application will journal the changes so that it can undo them again, if the user elects not to eventually commit.
*Behavior of Add button — Normally prompts for one new record. Setting to Add Multiple causes your application to prompt for an arbitrary number of new records without requiring the user to click Add again.
Transaction SmartPanel properties
There are no programmer‑modifiable instance properties for the Commit (Transaction) SmartPanel, apart from the object identifier.