Re: Variable getModelGlue is undefined
Yes - you don't. If your model needs any values from your config beans, they should be passed _to_ the model when the controller creates them. You don't want your model tied to your config. On 3/1/07, Robert Rawlins [EMAIL PROTECTED] wrote: Hello Guys, Having a bit of an issue with obtaining access to ColdSpring Y 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 ~| Upgrade to Adobe ColdFusion MX7 Experience Flex 2 MX7 integration create powerful cross-platform RIAs http://www.adobe.com/products/coldfusion/flex2/ Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271105 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
RE: Variable getModelGlue is undefined
Thanks for getting back to me on this Ray, its greatly appreciated, I've been tearing my hair out this morning :-D I'm still a little sketchy on the details though. I have beans in my model layer that need access to data from persistence, that I'm hoping to deliver through Reactor, how do I access reactor from my model? Do I have my controller access reactor and retrieve the query results, and then have the controller pass them into my model? From the documentation I've read I was under the impression the model interacts directly with reactor. Thanks again for the advice Ray, Rob -Original Message- From: Raymond Camden [mailto:[EMAIL PROTECTED] Sent: 01 March 2007 12:26 To: CF-Talk Subject: Re: Variable getModelGlue is undefined Yes - you don't. If your model needs any values from your config beans, they should be passed _to_ the model when the controller creates them. You don't want your model tied to your config. On 3/1/07, Robert Rawlins [EMAIL PROTECTED] wrote: Hello Guys, Having a bit of an issue with obtaining access to ColdSpring Y 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:271106 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
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 ~| ColdFusion MX7 and Flex 2 Build sales marketing dashboard RIAâs for your business. Upgrade now http://www.adobe.com/products/coldfusion/flex2 Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:271120 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
RE: Variable getModelGlue is undefined
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