0 Replies Latest reply on Apr 11, 2008 1:55 AM by pope on acid

    FLEX & Session Variables: a BUG?.

    pope on acid Level 1
      TARGET:
      Calling a Coldfusion Component with Remote Object to achieve a boolean value as result.
      If I declare the session variable inside the CF Function it works.
      If I declare the session variable before the CF Function was called it fails.

      See this test:

      A Coldfusion page (index.cfm) that defines a sesssion variable to start with:

      <!--- SHOW SESSION VARIABLES AND LOAD FLEX SWF IF "sesVAR" IS DEFINED, OTHERWISE DEFINE sesVar FIRST --->
      <cfif isDefined('session.sesVar')>
      <cfinclude template="index.html">
      <cfelse>
      <cfset session.sesVAR = "true">
      <cfinclude template="index.html">
      </cfif>

      COLDFUSION COMPONENT (CFComp.cfc):

      <!--- CHECK SESSION VARIABLE AND RETURN "TRUE" IF EXISTS --->
      <cffunction name="returnBoolean" access="public" returntype="boolean">
      <!--- UNCOMMENT FOLLOWING LINE AND EVERYTHING WORKS FINE --->
      <!---<cfset session.sesVar = 'yes'>--->

      <cfif isDefined('session.sesVar')>
      <cfset resultVal = TRUE>
      <cfelse>
      <cfset resultVal = FALSE>
      </cfif>
      <cfreturn resultVal>
      </cffunction>

      FLEX: