Yes, that's the whole idea:
Each fusebox will take it's fuseaction by using
ListFirst(request.CallerFuseAction, ".")
Then cut it off so the next fusebox down can also do the same.
to use the same example of a three level nested fusebox:

Fusebox1(Home Fusebox)
In
    request.CallerFuseAction = ""
    attributes.Fuseaction = BookStore.Cart.AddItem
    Variables.Fuseaction = BookStore  (this will be used in the CFSWITCH /
CFCASE)
Out:
    request.CallerFuseAction = BookStore.Cart.AddItem
    attributes.Fuseaction = Cart.AddItem

Fusebox2 (BookStore fusebox)
In
    request.CallerFuseAction = BookStore.Cart.AddItem
    attributes.Fuseaction = Cart.AddItem
    variables.Fuseaction = Cart
Out:
    request.CallerFuseAction = BookStore.Cart.AddItem
    attributes.Fuseaction = AddItem

Fusebox3 (Cart Fusebox)
In
    request.CallerFuseAction = BookStore.Cart.AddItem
    attributes.Fuseaction = AddItem
    variables.Fuseaction = AddItem

In any display performed in any of the fuseboxes they can keep the context
so that the same parent fusebox will receive the call by using:

variables.ParentFuseaction = Left( request.CallerFuseAction,
Len(request.CallerFuseAction) - Len(attributes.fuseaction) ).

and then:
<A
href="#CGI.ScriptName#?fuseaction=#variables.ParentFuseaction#ChildAction">

Again using the above example:
If from the AddItem you want to go to ViewItems:
variables.ParentFuseaction = "BookStore.Cart."
<A href="#CGI.ScriptName#?fuseaction=#variables.ParentFuseaction#ViewItems">
which will become:
<A href="index.cfm?fuseaction=BookStore.Cart.ViewItems">

Regards,
Noam


> ----------
> From:         Hulsey, James Phillip[SMTP:[EMAIL PROTECTED]]
> Reply To:     [EMAIL PROTECTED]
> Sent:         Monday, 24 July 2000 1:26
> To:   '[EMAIL PROTECTED]'
> Subject:      RE: Nested Fuesbox apps
> 
> Noam,
> Again. Great stuff.
> So, given what you're stating, we would actually have an n-tier fusebox
> solution? We could keep building request.CallerFuseAction by adding to it
> as
> it passes through each sub-app....couldn't we?
> 
> Sounds good to me! We need to standardize on this stuff as this is a big
> step toward portability and reuse :) Plug and play fusebox!
> 
> Phil
> 
> -----Original Message-----
> From: BOROVOY Noam
> To: '[EMAIL PROTECTED]'
> Sent: 7/21/00 9:45 AM
> Subject: RE: Nested Fuesbox apps (also RE: Other security considerations a
> nd fusebox methodologies...)
> 
> > How about refining the method to allow any fusebox to nest any other
> > fusebox
> > and allow all links to be built automatically:
> > 
> > If the variable request.CallerFuseAction is defined then all links can
> be
> > built using:
> > 
> > fuseaction for links:  request.CallerFuseAction &".ChildFuseAction"
> > Which then will be passed to the CGI.ScriptName which will be the top
> > level
> > Index.cfm
> > Such as: <A
> >
> href="#CGI.ScriptName#?fuseaction=#request.CallerFuseAction#.ChildAction
> "
> > 
> > So an example for a three level nesting:
> > BookStore.Cart.AddItem
> > The top level index.cfm has an action store which forwards to the
> store
> > sub
> > directory index.cfm with the action:
> > Cart.AddItem
> > Which in turn forward to Cart sub directory index.cfm with the action:
> >  AddItem 
> > 
> > This way the top level index.cfm files each only have a single case
> > statement for each child fusebox and they append this fuseaction to
> the
> > request.CallerFuseAction so that each included sub fusebox knows how
> to
> > build the links properly without having to hard code them.
> > 
> > With this and RFA's (return fuseactions) you could easily reuse
> modules at
> > any level without needing to know the internals of what you are
> including.
> > 
> > Let me know what you think,
> > Noam
> > 
> 
------------------------------------------------------------------------------
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