Hey Sean,
Thanks again for your help, I've just gotten around to implementing
the code and that certainly gets me a step closer:
Now, I want to use the new 'beans' injection feature in my controller
to get access to service objects, like so:
<controller id="CompanyController"
bean="CompanyController" beans="CompanyService">
from my understanding I need to inject the 'framework' into the
controller constructor in order for it to be able to get the beans, is
that correct? the constructor for my controller looks like this:
<cffunction name="init" access="public" output="false" hint="I'm the
class constructor">
<cfargument name="framework" />
<!--- Init the gesture abstract controller. --->
<cfset super.init(framework) />
<!--- Return the contorller --->
<cfreturn this />
</cffunction>
Because I'm defining the controller in ColdSpring it doesn't by
default have the framework passed to it, how can I configure
ColdSpring to pass the framework as a constructor argument to the
controller, is that possible? or will I have to go 'old school' and
define the desired beans as properties and create setters myself?
Cheers,
Rob
On 11 Aug, 11:32, Sir Rawlins <[email protected]>
wrote:
> Hey Sean,
>
> Thanks very much for the reply, I see how that works, thank you for
> your advice.
>
> Rob
>
> On Aug 11, 8:54 am, Sean Corfield <[email protected]> wrote:
>
>
>
> > On Mon, Aug 10, 2009 at 11:06 AM, Sir
>
> > Rawlins<[email protected]> wrote:
> > > <controller id="CompanyController"
> > > type="controller.CompanyController" beans="CompanyService">
>
> > This should be:
>
> > <controller id="CompanyController" bean="CompanyController"
> > beans="CompanyService">
>
> > That tells MG to get the controller from ColdSpring which is what you
> > need for everything else to work.
> > --
> > Sean A Corfield -- (904) 302-SEAN
> > Railo Technologies US --http://getrailo.com/
> > An Architect's View --http://corfield.org/
>
> > "If you're not annoying somebody, you're not really alive."
> > -- Margaret Atwood
--~--~---------~--~----~------------~-------~--~----~
Model-Glue Sites:
Home Page: http://www.model-glue.com
Documentation: http://docs.model-glue.com
Bug Tracker: http://bugs.model-glue.com
Blog: http://www.model-glue.com/blog
You received this message because you are subscribed to the Google
Groups "model-glue" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/model-glue?hl=en
-~----------~----~----~----~------~----~------~--~---