skip to main content
OpenEdge Development: AppBuilder
Organizer Objects : Simple SmartContainers
 
Simple SmartContainers
The Simple SmartContainer provides you with a way to create smart modules that can run in batch mode without a user interface. You can see this usage illustrated in Figure 42, where loadable modules are created by packaging SmartDataObjects and SmartB2BObjects in simple SmartContainers. Since neither the SmartDataObject nor the SmartB2BObject has a run-time representation, there is no need to use a visible container. The simple SmartContainer provides the critical services encapsulated in the SmartContainer super procedure without the overhead of a visible window. This can be very convenient in selected cases.
Of course, if you prefer to use a visible SmartContainer such as a SmartWindow, you are perfectly free to do so.
Creating and populating a Simple SmartContainer
The Simple SmartContainer is supplied as a template.
To create a complete object in AppBuilder:
1. Choose FileNew. Choose Simple Smart Container from the New dialog box that appears:
2. The container appears:
Note that objects of this type do not have a frame element, so you will not see a grid even if you have grid visibility turned on in your Preferences.
3. Reduce the size of the container workspace, if desired. Begin completing your new module by adding a non-visible SmartObject to the container. Shown here is a SmartDataObject:
Caution: If you place an object that has a visible representation at run time, the behavior of your simple SmartContainer module will be undefined.
4. Add additional objects as desired to complete the module. A SmartB2BObject is shown:
As you add such additional objects, Advisors might appear and offer to create SmartLinks for you. Examine each offer and accept those that seem appropriate.
5. Configure each object you employ in the module.
6. Open a Section Editor, if necessary, and add code to complete the module.
7. When you have completed the module, save your work using a distinctive filename. Note that simple SmartContainer filenames conventionally begin with c.
You now have a module you can use in your application.
Placing and configuring a SmartContainer module
The simple SmartContainer is an organizer object without a run-time representation. You can run it as an independent unit, or use it as a convenient wrapper for a module that you will make the child of some other smart organizer object.
As an independent module
To run a simple SmartContainer as an independent object requires no special preparation. Build the module as described in the “Creating and populating a Simple SmartContainer” section, save it, and run it using the startup parameters appropriate to your circumstances.
As a child module
To set up a simple SmartContainer as a child module, use the SmartObject Properties dialog box.
To place and configure a simple SmartContainer module that you created:
1. Click the SmartContainer icon in AppBuilder’s Object Palette.
2. When the Choose SmartContainer dialog box appears, select a module from the Master File list and click OK. For example:
3. Move your cursor to an empty place in your workspace and click to release the object. You will see a representation similar to the following:
4. Right-click on the instance and choose Properties from the context menu. The SmartObject Property Sheet dialog box appears:
5. Change the Object identifier to one that more clearly reflects the role of this container in your application.
6. If you wish to use this instance as a placeholder, check the Parameterize as Variable box. For information about placeholders, see the “Creating a SmartObject placeholder” section and OpenEdge Development: ADM and SmartObjects.
7. Save your work.
Note: The simple SmartContainer does not have a separate Instance Properties dialog box.