I have a group of CFC's that I access from two seperate Applicaiton scopes.
One /Application.cfc is in the Root.
The other Application is in /Admin/Application.cfc The cfcs are in in /_cfc/
If I call a cfc (using createObject())from a page in (for example) /Admin/members/edit.cfm, does this cfc get it's Application scope from:
Application 1: /Application.cfc
or
Application 2: /Admin/Application.cfc
The calling page is under Application 2, but the CFC itself is under Application 1.
I hope I am making sense.
Thanks
Jason
Scopes are dependant on the context in which a cfc is instantiated and not its physical location.
So given your example a cfc that lives under Application1 instantiated from a template in Application2 will see the application scope from Application2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With