Nested Fuseboxes have been my bane. This is an excellent method!
I have been promoting Fusebox arch to my users group, and always run into the wall of
sub fusebox
apps. This will sell well in my group. Thanks!
I have drifted from the norm in the pastbecause of this very issue. No one had given
me a good
alternative. This allows me to maitain the one fuseaction rule and stillnot need to be
aware of
any duplication of fuseactions in my sub fuses.
--- Hal Helms <[EMAIL PROTECTED]> wrote:
> 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=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=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=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=lists&body=lists/fusebox or
> send a message to [EMAIL PROTECTED] with 'unsubscribe' in the body.
__________________________________________________
Do You Yahoo!?
Get Yahoo! Mail � Free email you can access from anywhere!
http://mail.yahoo.com/
------------------------------------------------------------------------------
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.