Progress
Application Development
Environment — Getting Started


Detailed Order Line Section Procedure

The following sections lead you through assembling the Order Line section in more detail.

Adding a SmartFolder

In this section, you:

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. 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.

Follow these steps to add a SmartFolder:

  1. Choose the SmartFolder icon in the Object Palette.
  2. Position the pointer near the left edge of the Order Line section in the window and click once.
  3. The Progress Advisor opens, 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):

  4. Choose OK and the SmartFolder appears in the design window:
  5. Resize and reposition the folder, as shown in the following figure:
  6. With the right mouse button, open the SmartObject Instance menu, the square icon in the upper-left corner of the SmartFolder, and select Instance Properties from the pop-up menu:
  7. In the SmartFolder Properties dialog box, insert the following tab labels:
  8. Tab
    Label
    1
    Browser
    2
    Detail

    The completed dialog box should look like this:

  9. Choose OK.
  10. The SmartFolder now contains the two tabs with the labels you entered, as shown in the following figure:

  11. 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.

Follow these steps to define logical pages for the SmartFolder:

  1. Choose 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:
  3. 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.

  4. Choose Design to open the Design Page dialog box:
  5. Set the Page Number field to 1 and choose OK.
  6. Page 1 is now the current design page and is assigned to the Browser tab. Any objects that you now add to the SmartWindow display only when the Browser tab is selected.

  7. Choose the Start button on the Pages dialog box to open the Startup on Page dialog box:
  8. 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 opens at startup.

  9. Set the Page Number field to 1 and choose OK.
  10. Page 1 now displays at startup, along with the main page.

  11. Commit your changes to return to the main window.
  12. 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 a SmartDataBrowser to Page 1 Of the SmartFolder

Your next task is to add an SDB to Page 1, the Browser tab.

Follow these steps to add an SDB:

  1. From the Object Palette, choose the SDB icon to open the Choose SmartDataBrowser dialog box:
  2. Select bordlne2.w and choose OK.
  3. Click within the SmartFolder.
  4. The SDB appears in the SmartFolder. The Progress Advisor opens, 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.

  5. Select the radio button to create the SmartLink and choose OK.
  6. The Progress Advisor opens, 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.

  7. Select the radio button to create the SmartLink and choose OK.
  8. Position the SDB in the SmartFolder, as shown in the following figure:

Now that you have built the Browser tab, you are ready to build the Detail tab.

Adding a SmartDataViewer to Page 2 Of the SmartFolder

Before you add the SDV, vordlne, you must reset the current design page.

Follow these steps to specify design page 2 and add an SDV:

  1. Double-click the Page Number field in the Status Area of the AppBuilder:
  2. In the Goto Page dialog box, set the Display Page Number field to 2 and choose OK:
  3. The main window opens again with the Detail tab selected.

  4. Choose the SDV icon in the Object Palette to open the Choose SmartDataViewer dialog box.
  5. Select vordlne.w and choose OK.
  6. Click once in the Detail tab.
  7. The Progress Advisor opens, 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.

  8. Select the radio button to create the SmartLink and choose OK.
  9. Position the SDV, as shown in the following figure:
Adding a Navigation SmartPanel

You now add the Navigation SmartPanel, pnavico, to the Detail tab.

Follow these steps to add a Navigation SmartPanel:

  1. Choose the SmartPanel icon on the Object Palette and use the right mouse button to open a pop-up menu:
  2. Select Navigation Panel (Icons) from the menu.
  3. Position the pointer to the left of the SDV, and click once.
  4. The Progress Advisor opens, 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:

  5. Select the radio button to create the SmartLink to h_dordlne and choose OK.
  6. Move the SmartPanel into position, as shown in the following figure:

  7. 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 ADE 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 ADM2 SmartObjects. For information on running the application, see Working With the Sample Application."

If you would like to work more with SmartObjects, you can complete the exercises in An Overview Of SmartObject Technology." These exercises show how to fabricate SmartObject masters from templates installed with the product.


Copyright © 2004 Progress Software Corporation
www.progress.com
Voice: (781) 280-4000
Fax: (781) 280-4095