Haha ... excellent ... Any good resources that help you out the most?   This is pretty fun .. especially when you get past the simple CF issues (ie Application.cfm)
 
Paul Giesenhagen
QuillDesign
 
----- Original Message -----
Sent: Friday, October 03, 2003 10:47 AM
Subject: RE: [CFCDev] Just starting CFC's -- Session Question

Will do, I just started a while back, and with the help of the folks on the list have come a really long way (almost to long, I got so into OO, I decided to go back to school and start working on my second bachleors).  Just a warning.
 
Justin
-----Original Message-----
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 9:41 AM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] Just starting CFC's -- Session Question

Keep an eye on this, I am sure to have a few more problems/questions soon.
 
Thanks
Paul Giesenhagen
QuillDesign
 
----- Original Message -----
Sent: Friday, October 03, 2003 10:36 AM
Subject: RE: [CFCDev] Just starting CFC's -- Session Question

NP
-----Original Message-----
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 9:37 AM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] Just starting CFC's -- Session Question

uh-oh ... Someone kick me in the head ... I didn't bulid an Application.cfm to start up sessions ... I hate that!
 
Thx!
 
Paul Giesenhagen
QuillDesign
 
----- Original Message -----
Sent: Friday, October 03, 2003 10:23 AM
Subject: RE: [CFCDev] Just starting CFC's -- Session Question

Is it possible you have two application.cfm pages so that the components application has sessions defined differently than the cart?
-----Original Message-----
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 9:23 AM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] Just starting CFC's -- Session Question

/website/cart.cfm
/website/components/cartModule.cfc
 
 
----- Original Message -----
Sent: Friday, October 03, 2003 10:17 AM
Subject: RE: [CFCDev] Just starting CFC's -- Session Question

Where are your CFCs saved at in relation to your calling page?
-----Original Message-----
From: Paul Giesenhagen [mailto:[EMAIL PROTECTED]
Sent: Friday, October 03, 2003 9:18 AM
To: [EMAIL PROTECTED]
Subject: Re: [CFCDev] Just starting CFC's -- Session Question

ALSO,
 
It seems to NEVER save the session information, ie I can refresh ?mode=addCart over and over and it never keeps populating the session.
 
Paul Giesenhagen
QuillDesign
 
----- Original Message -----
Sent: Friday, October 03, 2003 10:10 AM
Subject: [CFCDev] Just starting CFC's -- Session Question

I am just now starting my learning on CFC's and having issues with sessions .. it is quite frustrating.
 
I created a VERY simple little input for building an array populated with a struct and then sticking it into a session.
 
I am not getting any session information from the calling CFM page .. if I set the session inside of the CFC.
 
Can anyone see what I am doing wrong?
 
If I run cart.cfm?mode=addCart  (I see the session set in the CFC -- cfdump)
 
AND then Run cart.cfm?mode=viewCart it says cartData is undefined in SESSION.
 
<!--- Calling CFM page --->
<cfparam name="url.mode" default="">
 
<cfswitch _expression_="#url.mode#">
 <cfcase value="delCart">
  <cfset variables.foo = StructDelete(session, "cartData")>
 </cfcase>
 <cfcase value="addCart">
  <cfparam name="url.qty" default="1">
  <cfparam name="url.id" default="1">
  <!--- <cfobject type="component" name="addCart" component="test.components.cartModule"> --->
  <cfinvoke component="test.components.cartModule" method="addCart"/>
 </cfcase>
 <cfcase value="viewCart">
  <cfdump var="#session.cartData#">
 </cfcase>
</cfswitch>
 
 
<!--- cartModule.cfc --->
<cfcomponent displayname="cartModule" hint="manages  Items to the Cart">
 <cffunction name="addCart" output="true" displayname="Adds Cart Stuff" hint="Adds Cart Stuff">
  <cfif IsDefined("session.cartData")>
   <cfset cartLen = ArrayLen(cart) + 1>
   <cfset cart[cartLen] = structNew()>
   <cfset cart[cartLen].qty = url.qty>
   <cfset cart[cartLen].id = url.id>
  <cfelse>
   <cfset cart = arrayNew(1)>
   <cfset cartLen = ArrayLen(cart) + 1>
   <cfset cart[cartLen] = structNew()>
   <cfset cart[cartLen].qty = url.qty>
   <cfset cart[cartLen].id = url.id>
  </cfif>
  <cfset session.cartData = cart>
  <cfdump var="#session.cartData#">
 </cffunction> 
</cfcomponent>
 
 
Also: If I call this component via CFOBJECT the <CFDUMP in the function doesn't display anything -- If I use <CFINVOKE it displays the dump.
 
Thanks
Paul Giesenhagen
QuillDesign
 

Reply via email to