1 Reply Latest reply on Feb 25, 2011 2:03 PM by pete_freitag

    Application Variables not available to CFC

    Evik-James

      I have an application that is working great. We use CFCs extensively. The CFC objects and application variables are set up in application.cfc (see below). The CFCs are in the cfc folder.  All the pages All is well.

       

      <cfscript>

      // CREATE APP VARIABLES

      APPLICATION.AppInfo = structNew();

      APPLICATION.AppInfo.mySchema = "dhop_123";

      APPLICATION.AppInfo.mySchema = "dhop_123";

       

      // CREATE OBJECT FOR CFC
      ro = structNew();
      ro.general = createObject('component', 'xxx.cfc.generalFunctions');

      </cfscript>

       

      The situation: I created a it of Ajax using jQuery. The page that I call is found and loads well via the script below. The parameters "Home" and "LetterToGet" are passed correctly to the page (getusers.cfm).

       

      <script type="text/javascript">
      $("document").ready( function () {

       

          $(".whichContent").click(function(e) {
              X = e.target.value;
              $("#Users").hide(100);
              $("#Users").load("ajax/getusers.cfm?Home=Users&LetterToGet="+X);
              $("#Users").show(500);
          $});

       

      });
      </script>

       

      My page can actually access the CFCs in the CFC folders if they don't require any APPLICATION variables.  If they DO require APPLICATION variables, such as to run a query, they fail.

       

      Is there a TYPICAL problem that occurs when a single page is called and tries to access the APPLICATION variables?