A developer can add functionality, such as inter-part communication or linking a button to an action, to a form by writing a Layout Control. A developer can also utilize layout control logic for form templates used as pages in meta-data wizards. See "Defining Wizard Pages" on page 716 for details.
Writing a layout control is beyond the scope of this document; see the information on the Aptify.Framework.WindowsControl.FormTemplateLayout class in the Aptify Software Development Kit (SDK) for information on writing a layout control.
After a developer has created a Layout Control that defines the desired behavior, follow these steps to implement it in Aptify:
- Open the top-level Form Templates record for the entity and click the Layout Control tab.
- Aptify recommends associating a layout control that defines inter-part communication and other functionality with the top-level form template rather than with a specific tab's form template. This way, the functionality will remain intact, even if fields move to different tabs on the same form.
- Specify the Layout Control Object, Layout Control Class, and Layout Control Assembly.
- You can add the object to the Object Repository from the Layout Control Object field, if it has not been added already. See "Creating Object Repository Objects" on page 358 for more information.
- The Layout Control tab for the top-level Persons form template is shown in Figure 10.66. Layout Control Tab
- If you have written a corresponding Web Layout Control to apply form logic to the Aptify Web Access (AWA) interface, specify the Web Layout Control Object, Web Layout Control Class, and Web Layout Control Assembly.
- If you have written a layout control for a Form Template to add behavior to the form within the Windows environment, this layout control does not apply to the form when rendered in the AWA environment. Due to the differences between the Windows and Web environments, a separate Web-specified layout control is required to add behavior to forms accessed using AWA. See the Aptify Web Access Guide for more information.
- Keep in mind that a Web Layout Control is not required to render a form template in AWA; an organization only needs to write a Web Layout Control if it wants to apply specific behavior to the Web version of a form template.
- Save and close the Form Templates record.
- Close and reopen the Aptify client.