Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
02-23-2010, 12:03 PM #1
- Join Date
- Feb 2010
- Thanked 0 Times in 0 Posts
cfdiv, cfinvoke and variable scope.
I am having a problem with a cfdiv tag that I am using in one of my pages, say page1.cfm. It is bound to a url, page2.cfm which then calls a cfc to retrieve some data. The data is passed back from the cfc to page2.cfm and I can output the data and manipulate it etc. However, back in page1.cfm where my cfdiv resides I don't have access to any of that data.
I guess I assumed that the cfdiv would work along the same lines as cfinclude when it comes to variables and just act as if it were all in the same page but it appears not.
I can kind of get around it by assigning the cfc's resultant data to a session variable but it throws an error when a new session is spawned and the page is first visited as the session variable doesn't exist yet. Again I could get around this by testing for it's existence etc but it seems like a convoluted way to solve this problem.
Am I missing something fundamental here?
02-24-2010, 06:09 AM #2
- Join Date
- Feb 2009
- NJ, USA
- Thanked 70 Times in 69 Posts
Hmm, I'm not getting a clear picture of exactly what you're trying to do. Post your code though and I'll take a look.