Difference between revisions of "Site Configuration (ADF.cfc)"

From ADF Docs
Jump to: navigation, search
(ADF Site Dev Mode)
 
(6 intermediate revisions by 3 users not shown)
Line 10: Line 10:
 
This initialized call builds the ''application.ADF'' object factory.  This function will load any site components in the '_cs_apps/components' directory into 'application.ADF' space.  The structure reference name will be the file name of the component.
 
This initialized call builds the ''application.ADF'' object factory.  This function will load any site components in the '_cs_apps/components' directory into 'application.ADF' space.  The structure reference name will be the file name of the component.
  
<source lang="java">
+
<pre>
 
/*
 
/*
 
  *
 
  *
Line 18: Line 18:
 
  */
 
  */
 
loadSite();
 
loadSite();
</source>
+
</pre>
 +
 
 +
=== ADF AjaxyProxy Path ===
 +
<pre>
 +
/*
 +
* Set the sites AjaxProxy URL
 +
* By default this file will be located in your sites /_cs_apps/ directory
 +
*/
 +
setAjaxProxyURL("#request.site.csAppsWebURL#ajaxProxy.cfm");
 +
</pre>
 +
 
 +
=== ADF LightboxProxy Paths ===
 +
<pre>
 +
/*
 +
* Set the sites lightboxProxy URL
 +
* By default this file will be located in your sites /_cs_apps/ directory
 +
*/
 +
setLightboxProxyURL("#request.site.csAppsWebURL#lightboxProxy.cfm");
 +
</pre>
 +
 
 +
=== ADF Site Dev Mode ===
 +
By default the ADF runs with development mode disabled (false) to enable set to (true). Production mode (development mode disabled) is highly recommended for public facing sites. Development mode opens up more robust exception handling messages for ajaxProxy and lightboxProxy javascript requests.
 +
<pre>
 +
/*
 +
* Set the sites enableADFsiteDevMode status
 +
* By default the ADF runs with development mode disabled (false) to enable set to (true)
 +
*      (Note: if this line is commented, removed or if no value is passed development mode will disabled)
 +
*      options: true or false
 +
*/
 +
enableADFsiteDevMode(false);
 +
</pre>
  
 
=== ADF Applications ===
 
=== ADF Applications ===
Line 24: Line 54:
  
 
This setup is in the ADF Component at the site.  Call the loadApp function through the ADF cfc.  Pass the argument for the ADF application bean name  (this name is defined when creating a new ADF application, [[Create_New_App|Create New ADF App]]).  
 
This setup is in the ADF Component at the site.  Call the loadApp function through the ADF cfc.  Pass the argument for the ADF application bean name  (this name is defined when creating a new ADF application, [[Create_New_App|Create New ADF App]]).  
<source lang="java">
+
<pre>
 
/*   
 
/*   
 
  * Load the ADF Application into application space   
 
  * Load the ADF Application into application space   
Line 32: Line 62:
 
  */
 
  */
 
loadApp("ptProfile");
 
loadApp("ptProfile");
</source>
+
</pre>
  
 
=== ADF Library Components ===
 
=== ADF Library Components ===
 
This command will load the latest versions of the ADF library components into the site, making the ADF library components accessible through the application.ADF scope throughout the site.
 
This command will load the latest versions of the ADF library components into the site, making the ADF library components accessible through the application.ADF scope throughout the site.
<source lang="java">
+
<pre>
 
/*
 
/*
 
  *
 
  *
Line 43: Line 73:
 
  */
 
  */
 
loadLibrary();
 
loadLibrary();
</source>
+
</pre>
  
 
=== ADF Library Components Overrides ===
 
=== ADF Library Components Overrides ===
 
This command will override the latest version of an ADF library component into the site.   
 
This command will override the latest version of an ADF library component into the site.   
<source lang="java">
+
<pre>
 
/*
 
/*
 
  * Define specific ADF Lib component version to load into the sites application space.
 
  * Define specific ADF Lib component version to load into the sites application space.
Line 56: Line 86:
 
  */
 
  */
 
resetLibrary("csdata_1_0", "csdata");
 
resetLibrary("csdata_1_0", "csdata");
</source>
+
</pre>
  
 
== Verify ==
 
== Verify ==

Latest revision as of 02:54, 6 December 2014

Overview

A key part of the configuration of the ADF for your site is the ADF.cfc located in your sites /_cs_apps/ directory (e.g. /mySite/_cs_apps/ADF.cfc).

This ADF component file is used to build an ADF object factory into application space for the site. The ADF component contains three distinct operations:

  1. Load the ADF into the site.
  2. Load ADF applications into the site.
  3. Load the ADF library components into the site.

Site Components

This initialized call builds the application.ADF object factory. This function will load any site components in the '_cs_apps/components' directory into 'application.ADF' space. The structure reference name will be the file name of the component.

/*
 *
 *	Load the Site Environment Configs/Elements and 
 *		Components ('/_cs_apps/components') into the site.
 *
 */
loadSite();

ADF AjaxyProxy Path

/*
 *	Set the sites AjaxProxy URL
 *	By default this file will be located in your sites /_cs_apps/ directory
 */
setAjaxProxyURL("#request.site.csAppsWebURL#ajaxProxy.cfm");

ADF LightboxProxy Paths

		
/*
 *	Set the sites lightboxProxy URL
 *	By default this file will be located in your sites /_cs_apps/ directory
 */
setLightboxProxyURL("#request.site.csAppsWebURL#lightboxProxy.cfm");

ADF Site Dev Mode

By default the ADF runs with development mode disabled (false) to enable set to (true). Production mode (development mode disabled) is highly recommended for public facing sites. Development mode opens up more robust exception handling messages for ajaxProxy and lightboxProxy javascript requests.

/*
 *	Set the sites enableADFsiteDevMode status
 *	By default the ADF runs with development mode disabled (false) to enable set to (true)
 *      (Note: if this line is commented, removed or if no value is passed development mode will disabled)
 *      options: true or false 
 */
enableADFsiteDevMode(false);

ADF Applications

To make an ADF application accessible at the site level, the ADF application must be loaded into the site's application scope.

This setup is in the ADF Component at the site. Call the loadApp function through the ADF cfc. Pass the argument for the ADF application bean name (this name is defined when creating a new ADF application, Create New ADF App).

/*  
 *	Load the ADF Application into application space  
 *  
 *      SAMPLES: 
 *		loadApp("CustomAppBeanName");
 */
loadApp("ptProfile");

ADF Library Components

This command will load the latest versions of the ADF library components into the site, making the ADF library components accessible through the application.ADF scope throughout the site.

/*
 *
 *	Define the ADF components to load into the sites application space.
 *
 */
loadLibrary();

ADF Library Components Overrides

This command will override the latest version of an ADF library component into the site.

/*
 *	Define specific ADF Lib component version to load into the sites application space.
 *	
 *	SAMPLE:
 *		resetLibrary("csdata_1_0", "csdata");
 *
 */
resetLibrary("csdata_1_0", "csdata");

Verify

To verify the site has been configured correctly, reset the ADF on the site to load the ADF into application space.