Add ADF Library Components into App
From ADF Docs
Revision as of 00:49, 20 December 2009 by Renee.mckechnie (talk | contribs)
Add ADF Library Components into an Application
Following are instructions for adding an ADF library component into an ADF Application:
- Open the AppBeanConfig.cfm file in your applications directory. See the App Bean Config wiki page for more details.
- Identify what ADF Library components and version you want added to your application.
- Add the 'addConstructorDependency' command into the App Bean Config.
addConstructorDependency(BeanName, InjectedBeanName, PropertyName);
- The parameters for the 'addConstructorDependency' command are as follows:
- BeanName:string:required - The name of the bean (Singleton or Transient) to add the Dependency to.
- InjectedBeanName:string:required - The name of the bean to inject.
- PropertyName:string:optional - The optional property name to pass the bean into. Defaults to the bean name if not provided.
- The following is an example of adding a dependency for the Scripts_1_0 ADF library component to your application.
addConstructorDependency(appBeanName, "scripts_1_0", "scripts");
- Where scripts_1_0 is the ADF Library component and the property name will be scripts when referenced within the apps application scope (i.e. Application.MYAPP.scripts).