I have MG 1.1 and CS 0.5.. Both Zips downloaded from the web sites today.
I'll try to fugure out how to the the CVS versions and update the post.. On 5/4/06, Chris Scott <[EMAIL PROTECTED]> wrote:
This is looking like a ModelGlue issue with autowiring, no? Do you have BERs of both frameworks? Chris Scott [EMAIL PROTECTED] http://cdscott.blogspot.com/ http://www.coldspringframework.org/ On May 4, 2006, at 8:21 PM, Brian Billings wrote: > I went in and changed to constructor-arg also... same thing. > > On 5/4/06, Brian Billings <[EMAIL PROTECTED]> wrote: >> I tried it and I got this right off.. >> >> GetConfigBean(): File Not Found! >> >> Then I changed it to : >> >> <cfset variables.SampleObj = getModelGlue().getConfigBean >> ("CSTest.xml") /> >> >> since that is how I get my other MG config beans and changed my MG >> bean mappings to: >> <setting name="beanMappings" value="/CSTEST/config/beans" /> >> >> then I got (I think Im closer): >> >> Element XMLROOT.XMLATTRIBUTES.CLASS is undefined in XBEAN. >> >> >> The error occurred in F:\MARC\ModelGlue\Bean\BeanFactory.cfc: line 34 >> Called from F:\MARC\ModelGlue\ModelGlue.cfc: line 400 >> Called from F:\MARC\CSTEST\controller\Controller.cfc: line 38 >> Called from F:\MARC\ModelGlue\ModelGlue.cfc: line 85 >> Called from F:\MARC\ModelGlue\Core\XMLModelGlueLoader.cfc: line 43 >> Called from F:\MARC\ModelGlue\ModelGlue.cfm: line 12 >> Called from F:\MARC\CSTEST\index.cfm: line 27 >> >> >> >> >> What do you think? >> >> >> >> >> On 5/4/06, Dave Ross <[EMAIL PROTECTED]> wrote: >> > >> > Brian, >> > >> > I noticed that SampleObj accepts "thisVal" as an argument to the >> > constructor, aka init(). Thus in your ColdSpring XML file you >> would use >> > <constructor-arg> instead of <property> (or add a setThisVal() >> method to >> > SampleObj). However, I don't think what you posted will *break* >> ColdSpring - >> > so for kicks, what happens when, instead of a setter method in >> your MG >> > controller, you add this to your controller's init(): >> > >> > <cfset variables.SampleObj = getModelGlue().getConfigBean >> ("SampleObj") /> >> > >> > Reason I ask is that I don't think the autowire stuff is part of >> the latest >> > release (but I could be wrong). >> > >> > -Dave >> > >> > On 5/4/06, Brian Billings <[EMAIL PROTECTED]> wrote: >> > > All, >> > > >> > > I'm trying to get started with CS and its not working as I expect >> > > (with no previous knowledge). >> > > >> > > I have a brand new model-glue app template in /CSTEST. >> > > >> > > I added beanFactoryLoader and autowireController to >> modelglue.xml: >> > > >> > > <config> >> > > <setting name="beanMappings" >> > value="/CSTEST/config/beans/CSTest.xml" /> >> > > <setting name="viewMappings" value="/CSTEST/views" /> >> > > <setting name="beanFactoryLoader" >> value="ModelGlue.Core.ColdSpringLoader" >> > /> >> > > <setting name="autowireControllers" value="true" /> >> > > <setting name="defaultEvent" value="Home" /> >> > > <setting name="reload" value="true" /> >> > > <setting name="debug" value="true" /> >> > > </config >> > > >> > > >> > > I added a model object named SampleObj.cfc in /CSTEST/model: >> > > >> > > <cfcomponent> >> > > <cffunction name="init"> >> > > <cfargument name="thisVal"> >> > > <cfset variables.thisVal = arguments.thisVal /> >> > > <cfreturn this /> >> > > </cffunction> >> > > <cffunction name="getValue"> >> > > <cfreturn variables.thisVal /> >> > > </cffunction> >> > > </cfcomponent> >> > > >> > > >> > > I added a coldspring XML file to /CSTEST/config/beans/ called >> CSTest.xml: >> > > >> > > <beans> >> > > <bean id="SampleObj" class="CSTEST.model.SampleObj"> >> > > <property name="thisVal"> >> > > <value>33</value> >> > > </property> >> > > </bean> >> > > </beans> >> > > >> > > I added a setter to my controller that matched the id in the >> > > coldspring XML file. >> > > >> > > <cffunction name="setSampleObj" returntype="void" output="false"> >> > > <cfargument name="SO"> >> > > <cfset variables.SampleObj = arguments.SO /> >> > > </cffunction> >> > > >> > > >> > > The setter in my controller isnt getting called.Im getting the >> > > following error when I try to use SampleObj in the variables >> scope >> > > from the onRequestStart function: >> > > >> > > Element SAMPLEOBJ is undefined in VARIABLES. >> > > >> > > >> > > Thanks to anyone that can help me get started. Im sure im >> > > misunderstanding something and just need a nudge in the right >> > > direction. Im attaching the whole thing (not much) just in >> case it is >> > > needed to troubleshoot. >> > > >> > > >> > > >> > >> > >> >> >> >
