You might want to use <instantiate /> and <invoke /> for your cfc. In that
case, if you don't want to create a mapping for your cfc, then you can place
your cfc's in a directory under the parsed directory.
In fusebox.xml
<classes>
<class alias="functions" classpath="cfc.functions" type="component"
constructor="init" />
</classes>
<globalfuseactions>
<appinit>
<do action="public.initfunction" />
</appinit>
</globalfuseactions>
In your circuit (I called it public, you can call it from wherever you want)
<fuseaction name="initfunction">
<instantiate object="application.functions"
class="functions" overwrite="true" />
</fuseaction>
Then when you need to call a function from it, you would call it either via
the invoke or set tags
<set name="returnitemifnecessary"
value="#application.functions.methodcall()#" />
OR
<invoke returnvariable="returnitemifnecessary" object="application.function"
methodcall="methodToBeCalled()">
<parameter name="parametername" value="parametervalue" />
</invoke>
Sandra Clark
==============================
http://www.shayna.com
Training in Cascading Style Sheets and Accessibility
-----Original Message-----
From: Chris Ditty [mailto:[EMAIL PROTECTED]
Sent: Friday, December 15, 2006 1:15 PM
To: CF-Talk
Subject: Re: Components & Fusebox 5
My directory structure is rather plain.
/
/act
/includes
/qry
/dsp
I am trying to make the include from the circuit.xml.cfm. This is what I
currently have that does not work.
<circuit access="public">
<fuseaction name="home">
<xfa name="submitForm" value="main.home" />
<include template="includes/functions.cfc"/>
<include template="act/act_killSessions.cfm"/>
<include template="dsp/dsp_welcome.cfm"/>
</fuseaction>
</circuit>
On 12/15/06, Sandra Clark <[EMAIL PROTECTED]> wrote:
> It would help to see what your directory structure is and how you are
> calling the include and from where. If its from your circuit.xml.cfm,
> try making the call relative to the parsed directory.
>
>
> Sandra Clark
> ==============================
> http://www.shayna.com
> Training in Cascading Style Sheets and Accessibility
>
>
> -----Original Message-----
> From: Chris Ditty [mailto:[EMAIL PROTECTED]
> Sent: Friday, December 15, 2006 11:31 AM
> To: CF-Talk
> Subject: Components & Fusebox 5
>
> I am trying to write my first fusebox 5 app using MX7 and components.
> I usually like to keep my functions in a seperate file in another
directory.
> When I try and do an include, I get an error saying that I am missing
> a Fuse.
>
> I could include this function library in all my pages, but I would
> rather it be called just once per fuse action.
>
> Any ideas?
>
> thanks
>
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:264154
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4