Difference between revisions of "Add New Library Component"
From ADF Docs
(→Related Guides) |
|||
(9 intermediate revisions by 2 users not shown) | |||
Line 2: | Line 2: | ||
The following describes the steps to add a new component to the ADF library: | The following describes the steps to add a new component to the ADF library: | ||
− | # Add a new directory in the 'ADF/lib' directory with the | + | # Add a new directory in the '''/ADF/lib/''' directory with the component name. (Note: do not use spaces or any special characters) |
− | # Create the new CFC file with the | + | # Create the new CFC file with the components name. (Again: do not use spaces or any special characters) |
# Be sure to give the file name the version number. See the [[Library_Component_Versions|ADF Library Component Versions]] wiki page for details on the ADF versioning schema. | # Be sure to give the file name the version number. See the [[Library_Component_Versions|ADF Library Component Versions]] wiki page for details on the ADF versioning schema. | ||
# Add the property fields to component. See [[Lib|ADF Lib]] wiki page for details on the property tags in the library components. | # Add the property fields to component. See [[Lib|ADF Lib]] wiki page for details on the property tags in the library components. | ||
# Update the component methods as needed. | # Update the component methods as needed. | ||
# [[Reset_ADF|Reset the ADF]] for the server and site. | # [[Reset_ADF|Reset the ADF]] for the server and site. | ||
− | + | ||
− | + | The new bean is now available in the object factory as the component file name. | |
− | + | ||
+ | === Using the new component in your site === | ||
+ | * The ADF will load the latest version of the file into the sites '''Application.ADF''' space. | ||
+ | * If there is more than one version on the '''/ADF/lib/''' components directory, then only the latest will be automatically loaded. To specify an older version of an ADF Lib component, then follow the instructions for [[Site Configuration (ADF.cfc)]]. | ||
+ | |||
+ | === Using the new component in your application === | ||
+ | * To make this new library component available to an application, you will need to make changes in the [[App_Bean_Config|App Bean Config]] file. Update the ADF library components commands for ''addConstructorDependency'' to use the new ADF library bean. | ||
+ | <source lang="java"> | ||
+ | addConstructorDependency(appBeanName, "myNewBean_1_0", "myNewBean"); | ||
+ | </source> | ||
== Related Guides == | == Related Guides == |
Latest revision as of 04:37, 15 April 2010
Contents
Add New Library Component
The following describes the steps to add a new component to the ADF library:
- Add a new directory in the /ADF/lib/ directory with the component name. (Note: do not use spaces or any special characters)
- Create the new CFC file with the components name. (Again: do not use spaces or any special characters)
- Be sure to give the file name the version number. See the ADF Library Component Versions wiki page for details on the ADF versioning schema.
- Add the property fields to component. See ADF Lib wiki page for details on the property tags in the library components.
- Update the component methods as needed.
- Reset the ADF for the server and site.
The new bean is now available in the object factory as the component file name.
Using the new component in your site
- The ADF will load the latest version of the file into the sites Application.ADF space.
- If there is more than one version on the /ADF/lib/ components directory, then only the latest will be automatically loaded. To specify an older version of an ADF Lib component, then follow the instructions for Site Configuration (ADF.cfc).
Using the new component in your application
- To make this new library component available to an application, you will need to make changes in the App Bean Config file. Update the ADF library components commands for addConstructorDependency to use the new ADF library bean.
addConstructorDependency(appBeanName, "myNewBean_1_0", "myNewBean");