![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |
Figure 128 provides a look at how the ControlWrapper exposes the implementation of a third-party library as a Custom Control within Forms.Figure 128 Custom Control Architecture
Figure 129 provides a description of the various design-time and runtime artifacts that go into a Components Library project.Figure 129 Component Library ProjectA special folder of type Components is used to store component library files. A library file defines a set of custom controls which are available in the Forms Designer palette.The option to create the Components special folder is presented at the time of new project creation.
1.
2.
3. The Form Component Library option is provided on the Asset Type Selection page. Specify the asset types as displayed in the following figure.
Figure 130 Asset Type Selection Page
4. The Asset Type Selection page provides the following two options for creating a component library project:
• Click Finish: creates a new project with a Components special folder. The <library>.library file is created in the Components special folder.
• Click Next: displays a wizard page that guides you to create a new component library project.
a.
b.
c. Specify Folder details on the Set Special Folders page and click Finish. This is an optional step. You can also click Finish in the preceding step. Creates a new project with a Components special folder. The .library file is created based on the details provided in the wizard.
You can designate a normal folder as a Components special folder as well, using a similar 'Special Folders > Use as Components Folder' technique as with other special folder types.The contents of the Components special folder are:
− .library file: the .library file contains the configuration information for a set of custom controls. For example: MyComponents.library.
− icons folder: the icons folder contains sample design-time icons for the custom controls.
5. Right-click the <library>.library file, and select Open. The library file is opened in the Component Library Editor for editing.Figure 131 Component Library ModelThe editor supports editing of the .library file, and provides an easy way to specify the configuration details for each custom control definition.
6. Select the <Library> node to view and edit the configuration details for the library element in the Properties view. Refer to Library section for a detailed description.
− Palette Drawer: a Library has a single Palette Drawer element. Refer to Palette Drawer section for the details.
− Event Type: a Library can have multiple Event Type elements. Refer to Event Type section for the details.
− External Resource: a Library can have multiple External Resource elements. Refer to External Resource section for the details.
− Control Type: a Library can have multiple Control Type elements. Refer to Control Type section for the details.
− Event Type: select the Library element, right-click, and select New Child > Event Type. A new Event Type element is added.
− External Resource: select the Library element, right-click, and select New Child > External Resource.Figure 132 Library Editor Properties View
− Capabilities: a Control Type has a single Capabilities element. Refer to Capabilities section for details.
− Property: a Control Type can have multiple Property elements. Refer to Property section for details.
− External Resource: select the Control Type element, right-click and select New Child > External Resource. A new External Resource element is added. An External Resource defined at the Control Type level is guaranteed to be loaded into the page only when a form uses this control type from the library.
− Property: select the Control Type element, right-click and select New Child > Property. A new Property element is added.
1. Create a folder in the Presentation Resources folder and place the .js file with the JavaScript wrapper implementation in this folder.
3. Click the picker provided for the Relative URI property. The Pick Resource dialog lists the JavaScript files available in the Presentation Resources folder.Figure 133 Pick Resource Dialog.
You have to select the Relative URI property sheet entry in order to activate the cell editor. Once activated, the '...' button will open the resource picker dialog.
4. Select the ControlWrapper class implementation file and click OK. Refer to Control Wrapper Implementation section for details.
2. Controls of other types can be refactored to custom control types by changing the control type field on the General Properties tab for the control.
![]() |
Copyright © TIBCO Software Inc. All Rights Reserved |