Can't find any examples via google...
I have a flex project with different components, and to connect to a database I use a single cfc file that contains various methods.
There is a flex component for login and another for retrieving data into a grid.
From the login component I use a remoteObject to call a method in the cfc. This method sets session variables for datasource and login details. It stores everything in the session correctly. However when in the other flex component (after login, trying to populate a grid), using a remoteObject to call the cfc, the session variables cannot be accessed (they don't appear to exist).
I'm wondering if this is due to having two remoteObject calls and for some reason there is different "instances" of the cfc being made, each with their own private session variables. I'm not sure if this is the case or whether I'm having some other problem.
Any advice would be appreciated. As I say, I can't see any examples of session variables used for login with Flex/Coldfusion cfc...
Has nobody done something similar or seen an example of this?
Essentially I want to have a User Object stored in a session on the server side...
OK the solution to my problem turned out to be very simple.
In case anyone else has this problem:
The first line of my cfc file contained
<cfcomponent displayname="someDisplayName" hint="SomeHint" output="false" >
I removed displayname and now sessions work