I tried this, but I must be missing a link in the chain of inheritance:

/members/Application.cfc - extends /siteroot.cfc
/siteroot.cfc - extends /Application.cfc
/Application.cfc - sets app name, enables session management

In siteroot.cfc, I have the following code:

<cfcomponent displayname="Application" extends="application">

        <cffunction name="OnSessionStart" output="false">
                <cfset super.OnSessionStart() />
        </cffunction>

        <cffunction name="OnRequestStart" output="false">
                <cfset super.OnRequestStart() />
        </cffunction>

</cfcomponent>

Unfortunately, when I try to reference a session variable inside /members/,
I get:

The requested scope session has not been enabled. 

In /Application.cfc, I have the following:

<cfcomponent displayname="Application">
        <cfscript>
        this.name = "MyApp";
        this.sessionmanagement = "True";
        this.sessiontimeout = CreateTimeSpan(0,0,20,0);
        </cfscript>

        <cffunction name="OnSessionStart" output="false">
                <cfset Session.LoggedIn = False />
        </cffunction>

        <cffunction name="OnRequestStart" output="false">
.....


So I'm assuming that the "this" scope isn't getting inherited down into
siteroot.cfc and into /members/Application.cfc...

Anyone got any ideas on how this could work using some kind of chaining?

Dan

> I guess you'd have the same problem any time you wanted to 
> extend a CFC of
> the same name that is in the root. I can't think of a way 
> around that aside
> from using a root mapping.




----------------------------------------------------------
You are subscribed to cfcdev. To unsubscribe, send an email to 
[email protected] with the words 'unsubscribe cfcdev' as the subject of the 
email.

CFCDev is run by CFCZone (www.cfczone.org) and supported by CFXHosting 
(www.cfxhosting.com).

An archive of the CFCDev list is available at
www.mail-archive.com/[email protected]


Reply via email to