2.8. Components

2.8.1. Defined components
2.8.2. An undefined component
2.8.3. Component tag reference
2.8.4. Component reference

A component is a high-level port, where we can bind a special object that generates the HTML code. It is allowed to communicate with your application and it may be created either by the template or by you in your application. These features are really useful when working with dynamic forms. You write several components that represent the form fields. Because they are allowed to communicate with the application, they can automatically display previously typed data, if the form needs to be refreshed because of validation errors. The components also have events which may be used for displaying error messages.

The components were especially developed for the Open Power Forms library (currently under development) that provides full support for the dynamic forms. However, you may write your own components and invent many new uses.

The components are placed in the template using OPT tags. The parser supports two types of components:

  1. Defined components - they are created directly by the template engine.
  2. Undefined components - created by the application and assigned to the undefined component tag in the template manually. Thus, the application may decide, which component will be displayed in specified place.

When it comes to the programming issues, components are objects of classes that implement ioptComponent interface. The last thing: remember that component support is only a platform. The way the feature elements are used, in fact depends on the component authors and does not have to be the same, as we planned.