Difference between revisions of "Add New Library Component"

From ADF Docs
Jump to: navigation, search
(Using the new component in your site)
(Using the new component in your application)
Line 16: Line 16:
 
=== Using the new component in your application ===
 
=== 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.
 
* 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 ==

Revision as of 14:03, 26 March 2010

Add New Library Component

The following describes the steps to add a new component to the ADF library:

  1. Add a new directory in the /ADF/lib/ directory with the component name. (Note: do not use spaces or any special characters)
  2. Create the new CFC file with the components name. (Again: do not use spaces or any special characters)
  3. 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.
  4. Add the property fields to component. See ADF Lib wiki page for details on the property tags in the library components.
  5. Update the component methods as needed.
  6. 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.

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");

Related Guides