That's right. As far as Ken's concern about the cfapplication tag, I place
this in the "myGlobals.cfm" file of the main fusebox. Then, if you need to
(for something like Admin, say) you can overwrite this in a nested fusebox
(or circuit app).

Hal Helms
www.TeamAllaire.com/hal <http://www.TeamAllaire.com/hal>



-----Original Message-----
From: BOROVOY Noam [mailto:[EMAIL PROTECTED]]
Sent: Monday, July 10, 2000 10:37 AM
To: [EMAIL PROTECTED]
Subject: RE: Nested fuseboxes


Let try and get this clearer- is the following correct:
Top level index.cfm includes globals and locals
Then cuts of first part of fuseaction and decides what circuit to call.
Includes that circuits (sub level) index.cfm
This includes sub levels locals and globals
...
cgi.script_name will always point to the top level index.cfm
Therefore all links must always go through the top level index.cfm and
include the fully qualified action fa1.fa2.fa3 ..

Regards,
Noam

        ----------
        From:  Hal Helms [SMTP:[EMAIL PROTECTED]]
        Sent:  Monday, 10 July 2000 16:06
        To:  [EMAIL PROTECTED]
        Subject:  RE: Nested fuseboxes

        I personally use cfinclude for all the nested fuseboxes. It's not
necessary
        but it makes it easier and the performance is better. I have every
fusebox
        (nested or otherwise) define its own globals file, which I have
combined and
        call "myGlobals.cfm". Nested fuseboxes inherit from the main fusebox
but can
        overwrite variables.

        Hal Helms
        www.TeamAllaire.com/hal <http://www.TeamAllaire.com/hal>



        -----Original Message-----
        From: BOROVOY Noam [mailto:[EMAIL PROTECTED]]
        Sent: Monday, July 10, 2000 7:02 AM
        To: '[EMAIL PROTECTED]'
        Subject: RE: Nested fuseboxes


        The whole point is that the top level index.cfm should not need to
know what
        the lower level index.cfm actions are. So using a separator is a
great idea.

        What is still confusing is including the sub fusebox as opposed to
        cfmoduling it or cflocating to it�s index.cfm
        Are the nested fuseboxes independent - can they be called directly?
        What about app_globals and app_locals how and where would they get
included
        in these cases?

        Noam

                ----------
                From:  Sean Renet [SMTP:[EMAIL PROTECTED]]
                Sent:  Monday, 10 July 2000 10:59
                To:  [EMAIL PROTECTED]
                Subject:  Re: Nested fuseboxes

                Hal, why not just do this?
                <cfcase
        value="forum,forumtopics,forumpostadd,forumpost,forummessage"
                delimiters=",">
                 <cfset title = "Benet's Forum">
                  <cf_act_htmltags>
                  <cfinclude template="forum/index.cfm">
                  </cf_act_htmltags>
                 </cfcase>
                ----- Original Message -----
                From: "Hal Helms" <[EMAIL PROTECTED]>
                To: <[EMAIL PROTECTED]>
                Sent: Sunday, July 09, 2000 10:29 AM
                Subject: RE: Nested fuseboxes


                > Fred,
                >
                > Great idea! That works very nicely. Thanks,
                >
                > Hal
                >
                > -----Original Message-----
                > From: Fred T. Sanders
[mailto:[EMAIL PROTECTED]]
                > Sent: Sunday, July 09, 2000 10:21 AM
                > To: [EMAIL PROTECTED]
                > Subject: Re: Nested fuseboxes
                >
                >
                > I kind of like your idea Hal, kind of seperates things in
a way
        I'm used
                to.
                > However if you want it to work the way you were thinking
        originally why
                not
                > just use list functions instead of the gettoken?  You
could do it
        like
                this
                > and it would work as originally hoped.
                >
                >
                > <cfset myName = "hal.helms">
                >
                > #LISTFIRST(myName,'.')#
                > #LISTLAST(myName,'.')#
                >
                >
                > <cfset myName = "hal">
                > #LISTFIRST(myName,'.')#
                > #LISTLAST(myName,'.')#
                >
                >
                > Fred
                >
                > ----- Original Message -----
                > From: "Hal Helms" <[EMAIL PROTECTED]>
                > To: <[EMAIL PROTECTED]>
                > Sent: Saturday, July 08, 2000 4:37 PM
                > Subject: RE: Nested fuseboxes
                >
                >
                > > Correction: the <cfswitch
                > > expression="#GetToken(attributes.fuseaction,2,'.')#>
requires a
        prefix.
                So
                > > you would need to change the <cfswitch> if you're using
it in a
        nested
                > > environment.
                > >
                > > -----Original Message-----
                > > From: Hal Helms [mailto:[EMAIL PROTECTED]]
                > > Sent: Saturday, July 08, 2000 4:31 PM
                > > To: [EMAIL PROTECTED]
                > > Subject: Nested fuseboxes
                > >
                > >
                > > A while back, someone asked about nesting fuseboxes and
we had
        some
                > > discussion on that. I'm working on a book for Prentice
Hall and
        in
                playing
                > > around with some sample code for it, I thought of
something that
        might
                be
                > > helpful. I'm going to test it out to see if I like it,
and
        thought you
                all
                > > might like to evaluate it.
                > >
                > > Here's a quote from the forthcoming book:
                > >
                > > The other approach to nested fuseboxes relies on using
an
        abbreviated
                > prefix
                > > to help the main fusebox identify who the fuseaction
belongs to.
        If I am
                > > working in the UserManger fusebox, I might give all my
        fuseactions a
                > prefix
                > > of UM with a separator:
                > >
                > > UM.loginUser
                > > UM_validateUser
                > >
                > > In the main fusebox, you then change your <cfswitch>
statement
        so that,
                > > instead of looking for attributes.fuseaction, it looks
for a
        prefix:
                > >
                > > <cfswitch expression =
        "#GetToken(attributes.fuseaction,1,'.')#">
                > >
                > > Your <cfcase> statements now only need send the action
to the
                appropriate
                > > nested fusebox:
                > >
                > > <cfcase value="UM">
                > >   <cfinclude template="UM/index.cfm">
                > > </cfcase>
                > >
                > > The last thing to do is to code the nested fusebox so
that it
        strips
                away
                > > the prefix.
                > >
                > > <cfswitch expression =
        "#GetToken(attributes.fuseaction,2,'.')#">
                > >
                > > The nice thing about this system is that it works
whether you
        have
                > prefixes
                > > or not.
                > >
                > > <cfset myName = "hal.helms">
                > > #GetToken(myName,1,'.')#
                > > #GetToken(myName,2,'.')#
                > >
                > > <cfset myName = "hal">
                > > #GetToken(myName,1,'.')#
                > > #GetToken(myName,2,'.')#
                > >
                > > will both return "hal"
                > >
                > > Hal
                > >
                >


----------------------------------------------------------------------------
        --
        To Unsubscribe visit
        http://www.houseoffusion.com/index.cfm?sidebar=sts&body=sts/fusebox
or send
        a message to [EMAIL PROTECTED] with 'unsubscribe' in
the
        body.


----------------------------------------------------------------------------
--
        To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or
send a message to [EMAIL PROTECTED] with 'unsubscribe' in
the body.
----------------------------------------------------------------------------
--
To Unsubscribe visit
http://www.houseoffusion.com/index.cfm?sidebar=sts&body=sts/fusebox or send
a message to [EMAIL PROTECTED] with 'unsubscribe' in the
body.

------------------------------------------------------------------------------
To Unsubscribe visit 
http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/fusebox or send a 
message to [EMAIL PROTECTED] with 'unsubscribe' in the body.

Reply via email to