Thanks for that Jon,

That makes sense to me now, I think I'll probably pass this in via Cold Spring 
to try and preserve encapsulation, I don’t really like accessing the app 
scope from within my beans directly.

Thanks again for your help, it'll no doubt prove invaluable :-D

Rob

-----Original Message-----
From: Jon Clausen [mailto:[EMAIL PROTECTED] 
Sent: 01 March 2007 15:12
To: CF-Talk
Subject: Re: Variable getModelGlue is undefined

Rob,

You can get your framework object ( and thus return the same object  
that "getModelGlue()" returns in the controllers) through one of two  
methods:

1) Pass it in as a constructor argument through Coldspring (see my  
previous reply to one of your posts)

2) The framework is scoped in the application at  
application.yourapplicationkey.framework

Once the framework is passed into your component and is in the  
variables scope you can use it just like "getModelGlue()":

<cfset variables.reactor = variables.framework.getORMService()/>
or

<cfset myBean = variables.framework.getBean("myBean")/>

HTH,

Jon

On Mar 1, 2007, at 3:57 AM, Robert Rawlins wrote:

> Hello Guys,
>
> Having a bit of an issue with obtaining access to ColdSpring and  
> Reactor from my model layout in MG using the getModelGlue().getBean 
> () method. I've been using this in my controller to instantiate a  
> bean and it works perfectly, however when I place it in any of the  
> CFC's in my model layer I get the error 'Variable getModelGlue is  
> undefined' thrown back at me.
>
> Do I access this stuff differently from my model layer?
>
> Thanks chaps, Rob





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Macromedia ColdFusion MX7
Upgrade to MX7 & experience time-saving features, more productivity.
http://www.adobe.com/products/coldfusion

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271127
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to