skip to main content
OpenEdge Getting Started: Progress OpenEdge Studio
Assembling the Order Tracking System : Building the Order Line section
 
Building the Order Line section
The Order Line section contains a SmartFolder with SmartObjects for viewing and browsing order line information. When you are finished with this section of the tutorial, your window should look like the following:
Task list and short procedure
To reach this point, you must know how to perform the following tasks:
1. Add a SmartFolder
2. Link the SmartFolder to the SmartWindow
3. Define two tabs on the SmartFolder
4. Set logical pages
5. Add a prebuilt SmartDataBrowser (SDB) to Page 1
6. Link an SDB to an SDO
7. Add a prebuilt SDV to Page 2
8. Link an SDV to an SDO
9. Add a Navigation SmartPanel to Page 2
10. Link the SmartPanel to the SDO
The following short procedure outlines how to complete these tasks.
To build the Order Line section:
1. Add a SmartFolder to the Order Line section. See the “Adding a SmartFolder” section to review this procedure.
2. Create a Page SmartLink from the SmartFolder to the SmartWindow. See Step 2 in the “Adding a SmartFolder” section to review this procedure.
3. Resize the SmartFolder. See Step 4 in the “Adding a SmartFolder” section to review this procedure.
4. Create Browser and Detail tabs for the SmartFolder. See Step 5 in the “Adding a SmartFolder” section to review this procedure.
5. Assign a logical page to the Browser tab and set it to display on startup. See the “Creating page 1 of the SmartFolder” section to review this procedure.
6. Add the prebuilt SDB, bordlne2.w, to the Browser tab. See the “Adding an SDB to page 1 of the SmartFolder” section to review this procedure.
7. Create a Data SmartLink from the SDO, dordlne.w, to the SDB. See Step 3 in the “Adding an SDB to page 1 of the SmartFolder” section to review this procedure.
8. Create an Update SmartLink from the SDB to the SDO, dordlne.w. See Step 4 in the “Adding an SDB to page 1 of the SmartFolder” section to review this procedure.
9. Add the prebuilt SDV, vordlne.w, to the Details tab. See the “Adding an SDV to page 2 of the SmartFolder” section to review this procedure.
10. Create a Data SmartLink from the SDO, dordlne.w, to the SDV. See Step 5 in the “Adding an SDB to page 1 of the SmartFolder” section to review this procedure.
11. Add a Navigation SmartPanel to the Details tab. See the “Adding a Navigation SmartPanel” section to review this procedure.
12. Create a Navigation SmartLink from the SmartPanel to the SDO, dordlne.w. See Step 3 in the “Adding a Navigation SmartPanel” section to review this procedure.
Detailed Order Line section procedure
The sections that follow guide you through assembling the Order Line section in more detail.
Adding a SmartFolder
In the Order Tracking System main window, the SmartWindow uses three logical pages (0, 1, and 2) to display SmartObjects. Logical pages control which SmartObjects are displayed at a given time. Objects on the default logical page, page 0, are always visible. The SmartFolder uses logical pages 1 and 2 for its tabs. The SmartFolder controls the display of SmartObjects on these pages by toggling their visibility depending on which tab is selected.
Note: A SmartFolder can only control the display of SmartObjects. A basic object, such as a text object or a rectangle, must be included in a SmartObject before a SmartFolder can control its display.
To add a SmartFolder:
1. Click the SmartFolder icon in the Object Palette.
2. Position the SmartFolder near the left edge of the Order Line section in the window. The Progress Advisor notifies you that the SmartFolder should be a Page Source for some other SmartObject, and offers to create a Page SmartLink to the container (the SmartWindow):
3. Click OK. The folder appears in the design window:
4. Resize and reposition the folder, as shown in the following:
5. Click the SmartObject Instance menu, the square icon in the upper‑left corner of the SmartFolder, and choose Instance Properties from the pop-up menu:
6. In the SmartFolder Properties dialog box, insert the following tab labels:
 
Tab
Label
1
Browser
2
Detail
The completed dialog box should look like the following:
7. Click OK. The folder now contains two tabs with the labels you entered:
8. Save your work.
Creating page 1 of the SmartFolder
Before you can add objects to the SmartFolder tabs, you must define logical pages for the tabs. In this instance, the Browser tab of the SmartFolder controls logical Page 1. When you add a logical page for a tab, you control which objects appear when that tab is selected.
To define logical pages for the SmartFolder:
1. Click the Procedure Settings icon in the AppBuilder toolbar to open the Procedure Settings dialog box:
2. Choose the Pages icon to open the Pages dialog box:
The page numbers begin with Page 0. Page 0 is the default (Main) page. Objects assigned to Page 0 are always displayed, regardless of which folder tab is selected. The objects that you added to the main window so far, such as dcust, dorder, and the SmartFolder itself, are all assigned to Page 0 by default.
3. Click Design to open the Design Page dialog box:
4. Type 1 in the Page Number field and click OK. Page 1 is now the current design page and is assigned to the Browser tab. Any objects that you add to the SmartWindow now display only when the Browser tab is selected.
5. Click the Start button on the Pages dialog box to open the Startup on Page dialog box:
The value in the Page Number field determines which page, if any, displays in addition to Page 0 when the application first runs. In the SportsPro Order Tracking System, you want Page 1 to be the startup page so the SDB displaying the order lines appears at startup.
6. Type 1 in the Page Number field and click OK. Page 1 now displays at startup, along with the main page.
7. Commit your changes to return to the main window. The Status Area of the AppBuilder indicates you are now working in Page 1:
The SmartFolder is now configured to control the display of other SmartObjects.
Adding an SDB to page 1 of the SmartFolder
Your next task is to add an SDB to Page 1, the Browser tab.
To add an SDB to page 1:
1. Click the SDB icon from the Object Palette to open the Choose SmartDataBrowser dialog box:
2. Select bordlne2.w and click OK.
3. Place the SDB in the Browser tab. The Progress Advisor notifies you that the SDB instance, h_bordlne2, should be a Data Target for some other SmartObject, and offers to create a Data SmartLink from the SDO instance, h_dordlne.
4. Select the radio button to create the SmartLink and click OK. The Progress Advisor notifies you that the SDB instance, h_bordlne2, should be an Update Source for some other SmartObject, and offers to create an Update SmartLink to the SDO instance, h_dordlne.
5. Select the radio button to create the SmartLink and click OK.
6. Position the SDB in the tab:
Now that you have built the Browser tab, you are ready to build the Detail tab.
Adding an SDV to page 2 of the SmartFolder
Before you add the SDV, vordlne, you must reset the current design page.
To specify design page 2 and add an SDV:
1. Double‑click the Page Number field in the Status Area of the AppBuilder. The Goto Page dialog box appears:
2. Set the Display Page Number field to 2 and click OK. The main window appears with the Detail tab selected.
3. Choose the SDV icon in the Object Palette to open the Choose SmartDataViewer dialog box.
4. Select vordlne.w and click OK.
5. Place the SDV in the Detail tab. The Progress Advisor notifies you that the SDV instance, h_vordlne, should be a Data Target for some other SmartObject, and offers to add a Data SmartLink from the SDO instance, h_dordlne.
6. Select the radio button to create the SmartLink and click OK.
7. Position the SDV as shown:
Adding a Navigation SmartPanel
You now add the Navigation SmartPanel, pnavico, to the Detail tab.
To add a Navigation SmartPanel to the Detail tab:
1. Right-click the SmartPanel icon on the Object Palette. A pop-up menu listing the available SmartPanels appears:
2. Select Navigation Panel (Icons) from the pop-up menu.
3. Add the SmartPanel to the left of the SDV. The Progress Advisor notifies you that the SmartPanel, pnavico, should be a Navigation Source for some other SmartObject, and offers to add a Navigation SmartLink to one of the following SDO instances, h_dcust, h_dorder, or h_dordlne:
4. Select the radio button to create the SmartLink to h_dordlne and click OK:
5. Save your work.
You have now assembled the main window of the SportsPro Order Tracking system using predefined objects. You should have a better understanding of how to use the OpenEdge Studio and AppBuilder to assemble SmartObject applications. Run your application and test the code you created.
If you have not already run the complete sample application, you might want to run it now. Running the application gives you an opportunity to see some of the other capabilities of SmartObjects. For information on running the application, see Chapter 2, “Working with the Sample Application.”
If you would like to work more with SmartObjects, you can complete the exercises in Chapter 4, “Overview of SmartObject Technology.” These exercises show how to fabricate SmartObject masters from templates installed with the product.