Newbie Question - coldspring.xml

21 views
Skip to first unread message

mpa...@empowersis.com

unread,
Jun 6, 2013, 4:44:03 PM6/6/13
to coldspri...@googlegroups.com
I was working with FW/1 and came to a point that I need to "wire" the DI factory.  I am running CF8 on dev so I tried to use DI/1 and that does not work on that version, come to find out. ( Loosing lots of time today.)

Anyway

Here I am with ColdSpring, seems simple enough, but issue I think I am having is the coldspring.xml

I only have one service at this point call courses.  wwwroot/(myApp in FW/1)/model/services/courses.cfc

My App is not on the root is the point here, I guess.

application.cfc
contains
<cfset coldspringConfig = 'assets/config/coldspring.xml' />
<cfset beanFactory = CreateObject('component', 'coldspring.beans.DefaultXmlBeanFactory').init() />
<cfset beanFactory.loadBeans(coldspringConfig) />


(myApp in FW/1)/assets/config/coldspring.xml
contains
<beans default-autowire="byName">
<bean id="courses" class="model.services.courses" lazy-init="true" singleton="true"></bean>
</beans>


(myApp in FW/1)/controllers/main.cfc
...
<cfset rc.Locations = getCoursesService.getTop()>
...
<cffunction name="getCoursesService" access="public" output="false">
<cfreturn variables.coursesService>
</cffunction>
<cffunction name="setCoursesService" returntype="void" access="public" output="false">
<cfargument name="coursesService" type="any" required="true" />
<cfset variables.coursesService = arguments.coursesService />
</cffunction>


I am getting Error message:

The getTop method was not found.


Maybe I should be posting this to FW/1 not sure.

Doug Boude

unread,
Jun 6, 2013, 5:13:53 PM6/6/13
to coldspri...@googlegroups.com
If you haven't already seen this short blog post, check it out. It looks like a simple example of implementing CS in FW/1, and mentions an issue with the ID value of the bean you're defining. http://christierney.com/2012/03/13/fw1-and-service-beans-in-coldspring/



--
You received this message because you are subscribed to the Google Groups "ColdSpring-Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to coldspring-use...@googlegroups.com.
To post to this group, send email to coldspri...@googlegroups.com.
Visit this group at http://groups.google.com/group/coldspring-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

mpa...@empowersis.com

unread,
Jun 6, 2013, 5:27:42 PM6/6/13
to coldspri...@googlegroups.com
No change in my case.  No affect on my results at all.

Matt Quackenbush

unread,
Jun 6, 2013, 5:33:36 PM6/6/13
to coldspri...@googlegroups.com
My guess is that you've either not defined a property for the service on your controller, haven't told FW/1 about your bean factory, or have a mapping issue. In any case, I really seriously doubt this is a ColdSpring issue.

HTH
Reply all
Reply to author
Forward
0 new messages