skip to main content
OpenEdge Development: AppBuilder
Organizer Objects : Paging without SmartFolders
Paging without SmartFolders
Because paging is a property of the ADM itself rather than of SmartFolder objects, it is quite easy to develop an ADM‑based paging scheme of your own, if you choose. Figure 23 and Figure 24 represent two possible designs for which AppBuilder supplies predefined controls.
Figure 23: Paging using button controls
Figure 24: Paging using radio‑set controls
The two layouts illustrated here resemble a SmartFolder in appearance, but that was a deliberate design choice, not a requirement of the technology. You could create designs that look very different to these. You could use images rather than text on button controls. You could arrange the control buttons along the side or bottom rather than the top, color‑code them, use very long strings as labels, and so forth. The possibilities are numerous.
The key to paging is the selectPage() procedure:
RUN selectPage (63).
Inserted as the trigger code for a button CHOOSE event, the example call would reveal all SmartObjects assigned to page 63 and hide all others. The value of the argument can be any non‑negative INTEGER.
An alternative to the selectPage() call is the viewPage() call. Calling viewPage(63) would reveal all SmartObjects assigned to page 63, but it will not hide any others. Anything in view before the call will still be in view after. This creates quite a different effect.
AppBuilder supplies a button that contains the following code for the Choose event:
  RUN viewPage (1).
Right‑click the button object icon in the Palette and choose the View Page item from the list. You can convert this button very easily by substituting a call to selectPage() for the existing call to viewPage(). Make this substitution using AppBuilder’s built-in Section Editor.
buttons are not your only choice for paging controls. AppBuilder also supplies a set of radio buttons predefined with selectPage( ) calls. Right‑click the radio‑set object icon in the Palette and choose the Page Select item from the list.
Note: You should keep in mind that Progress Software Corporation supplies this radio set as a convenience, but does not necessarily endorse its use. Most experienced GUI users expect radio‑sets to represent data, so using them as action controls might cause confusion and reduce your application’s usability.