Progress
AppBuilder
Developer’s Guide
Multiple Layouts for SmartObjects
Multiple layouts for SmartObjects are designed to provide alternate visualizations of a SmartObject, as might be required by use in different SmartContainers or by other functional criteria of the application, such as access privileges. Thus, the setup and initialization of a SmartObject layout is not primarily a function of the run-time environment, but of the SmartContainer logic that instantiates the SmartObject.
For SmartObjects, multiple layouts are supported by these ADM properties:
- LayoutOptions — Contains a comma-separated list of the layouts that you set up for a SmartObject in the AppBuilder at design time.
- LayoutVariable — Contains the layout that you choose (other than the default) for an instance of the SmartObject when you add it to a SmartContainer. (If you choose the default, the SmartObject uses the value of the DefaultLayout property.) This is also the variable that you set to change a SmartObject’s layout at run time.
- DefaultLayout — Contains the layout that the SmartObject uses if you do not set an ObjectLayout property value for an instance of the SmartObject. DefaultLayout is set based on the run-time settings established in the Alternate Layout dialog box. If DefaultLayout has no value, the SmartObject uses the master layout.
- ObjectLayout — Contains the layout that the SmartObject uses.
Unlike the run-time expressions used for basic procedure files, the setting of these properties does not immediately affect a SmartObject’s layout. Rather, the action of these properties depends on initialization of the SmartObject by its SmartContainer. At run time, the initializeObject() event procedure runs the layout cases internal procedure {&LAYOUT–VARIABLE}s by running applyLayout. The applyLayout() event procedure uses the value of the ObjectLayout or DefaultLayout property to determine initial visualization for the SmartObject. At any point after initialization, you can choose a different layout for the SmartObject by setting and applying a different value to the ObjectLayout property (from LayoutOptions).
Copyright © 2004 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |