If you are also working on a framework you can find some information in this tutorial: http://ortus.svnrepository.com/coldbox/trac.cgi/wiki/cbColdspringGuide
It covers properties, access to the factory itself and also to leverage the custom factories. Luis Majano On 7/3/07, Dan Vega <[EMAIL PROTECTED]> wrote:
All, I wrote a tutorial on how to pass properties to ColdSpring during instantiation. I think this is what you are looking for http://www.danvega.org/blog/index.cfm/2006/11/25/Passing-Properties-To-ColdSpring Dan Vega On 7/3/07, Brian Kotek < [EMAIL PROTECTED]> wrote: > > Barney, I just see it doing this in the DefaultXMLBeanFactory: > > <cffile action="read" file="#arguments.importedFilename#" > variable="fileContent" /> > > which reads in the XML file. I might be missing something, but where > would making that a CFML template come into play, since it doesn't seem to > be executed but rather just read in? > > On 7/3/07, Brian Kotek <[EMAIL PROTECTED] > wrote: > > > > ooo thanks Barney. I thought CS did exactly what you say, a string > > replace on the actual XML text before it parsed it. Thanks! > > > > On 7/3/07, Barney Boisvert <[EMAIL PROTECTED]> wrote: > > > > > > You can't do that. Property substitutions are only for > > > property/constructor-arg values. I.e. they're not done in a "string > > > replace" fashion, but in an "value replace" fashion. If you want to > > > parameterize other parts of the XML, you have to use some other > > > mechanism. > > > > > > There are a wide array of ways to do that, the simplest of which is > > > to > > > just give your XML a .CFM extension, and then > > > CFSAVECONTENT/CFINCLUDE > > > it to load it so that it'll run through the CFML engine. It's kind > > > of > > > kludgey, but it works, and it'll give you the full power of CFML for > > > building the XML. > > > > > > cheers, > > > barneyb > > > > > > On 7/3/07, Nicholas Vacek < [EMAIL PROTECTED]> wrote: > > > > How do use a variable Component Path for my bean definitions? > > > > > > > > An example bean definition: > > > > > > > > <beans> > > > > <bean id="Calculators" class="Components.Calculators " > > > singleton="true"> > > > > <constructor-arg > > > > name="datasource"><value>${datasource}</value></constructor-arg> > > > > </bean> > > > > </beans> > > > > > > > > I put all my CFC files into a folder called "components", within > > > the > > > > webroot. Thus this file path needs to be in the class attribute of > > > the > > > > bean definition, in order for ColdSpring to find the cfc's. > > > > > > > > I've figured out how to pass in a datasource to my ColdSpring > > > > BeanFactory, so my config file can be modular/reusable/etc. But > > > I'd like > > > > the Component Path be a variable too, and I can't figure out how > > > to do > > > > it. This code causes errors with ColdSpring: > > > > > > > > <beans> > > > > <bean id="Calculators" > > > class="${componentPath}.Calculators" > > > > singleton="true"> > > > > <constructor-arg > > > > name="datasource"><value>${datasource}</value></constructor-arg> > > > > </bean> > > > > </beans> > > > > > > > > Thanks in advance for any help you can give! > > > > > > > > > > > > -- > > > > Nicholas Vacek > > > > Vivid Image - Programmer > > > > 320-587-8974 ext. 111 > > > > [EMAIL PROTECTED] > > > > http://www.vimm.com > > > > > > > > > -- > > > Barney Boisvert > > > [EMAIL PROTECTED] > > > http://www.barneyb.com/ > > > > > > Got Gmail? I have 100 invites. > > > > > > > > > -- Thank You Dan Vega [EMAIL PROTECTED] http://www.danvega.org
-- Luis F. Majano Computer Engineer [EMAIL PROTECTED] http://www.luismajano.com
