Difference between revisions of "Site Configuration (ADF.cfc)"
(→Custom-Application.cfm) |
|||
Line 35: | Line 35: | ||
== Custom-Application.cfm== | == Custom-Application.cfm== | ||
When custom-application.cfm is called, a check is run to setup the ADF in the server and site application space. | When custom-application.cfm is called, a check is run to setup the ADF in the server and site application space. | ||
− | <source lang=" | + | <source lang="cfm"> |
<!--- ADF ---> | <!--- ADF ---> | ||
<cfinclude template="/ADF/core/load_site_adf.cfm"> | <cfinclude template="/ADF/core/load_site_adf.cfm"> |
Revision as of 20:57, 25 March 2010
Contents
Overview
Site Configuration provides the capability for the ADF library components to be used within a site. A few updates are needed to enable this functionality.
The ADF library components are loaded into application space for the site. The ADF.cfc is a configuration file that enables a site by site specification for the ADF library components.
Test
<html lines=0>
Test
</html>
<?php
v = "string"; // sample initialization
?>
html text
<?
echo v; // end of php code
?>
Starter Files
Starter Files are located in the '/ADF/core/site-sample' directory. This contains a starter 'custom-application.cfm' and 'ADF.cfc', which contain the basic initialization code for the ADF configuration into a site.
Setup
- Locate the '/ADF/core/site-sample' directory.
- Copy the ADF.cfc and ajaxProxy.cfm file into the site's '/_cs_apps/' directory.
- Open the custom-application.cfm file and copy the code block into your sites custom-application.cfm file.
Custom-Application.cfm
When custom-application.cfm is called, a check is run to setup the ADF in the server and site application space.
<!--- ADF --->
<cfinclude template="/ADF/core/load_site_adf.cfm">
ADF Component (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:
- Load the ADF into the site.
- Load ADF applications into the site.
- 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 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();
Verify
To verify the site has been configured correctly, reset the ADF on the site to load the ADF into application space.