Difference between revisions of "Load ADF Components into Site"

From ADF Docs
Jump to: navigation, search
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
 
== Overview ==
 
== Overview ==
By default, when you configure a site to use the ADF, the latest version of all of the [[Library| ADF Library Components]] are loaded into the sites application.ADF memory space. Loading the ADF Library components into the site is controlled in the [[Site Configuration]].
+
By default, when you configure a site to use the ADF, the latest version of all of the [[Library| ADF Library Components]] are loaded into the sites application.ADF memory space. Loading the ADF Library components into the site is controlled in the [[Site Configuration (ADF.cfc)]].
  
 
== Load specific version of ADF Library Component ==
 
== Load specific version of ADF Library Component ==
Line 12: Line 12:
 
# Remove any methods you DO NOT WISH TO MODIFY
 
# Remove any methods you DO NOT WISH TO MODIFY
 
# Make modifications to the methods you would like to change
 
# Make modifications to the methods you would like to change
# Follow the instructions for [[Site_Configuration#ADF_Library_Components_Overrides|ADF Library Components Overrides]].
+
# Follow the instructions for [[Site Configuration (ADF.cfc)]].
 
# [[Reset the ADF]]
 
# [[Reset the ADF]]
  

Latest revision as of 04:50, 15 April 2010

Overview

By default, when you configure a site to use the ADF, the latest version of all of the ADF Library Components are loaded into the sites application.ADF memory space. Loading the ADF Library components into the site is controlled in the Site Configuration (ADF.cfc).

Load specific version of ADF Library Component

To load a specific version of an ADF Library component into the sites 'application.ADF' scope you need to:

  1. Create a /lib/ directory within you sites /_cs_apps/ directory (e.g. /mySite/_cs_apps/lib/)
  2. Copy the original ADF Library Component into that /lib/ directory (e.g. /mySite/_cs_apps/lib/csData_1_0.cfc
  3. Change the copied file so that it extends the original
  <cfcomponent extends="ADF.lib.csData.csData_1_0">...</cfcomponent>
  1. Remove any methods you DO NOT WISH TO MODIFY
  2. Make modifications to the methods you would like to change
  3. Follow the instructions for Site Configuration (ADF.cfc).
  4. Reset the ADF

What does this mean?

By making this modification, any code within your site that uses code similar to this:

  <cfset myData = application.ADF.csData.getStandardMetadata(pageID)>

Will use the component located within your /_cs_apps/lib/ directory instead of the one located in the /ADF/lib/ directory.