Sorry I don't have an answer to this (hopefully someone else will chime in),
but bear in mind that worst case if you ever run into something you can't do
in the XML, you could always generate the XML.
At the simplest, read in the XML file as a string, replace (say) %VarName%
with the appropriate variable value, and then save a copy of the XML file in
the destination directory. Of course you could also programatically
manipulate the XML file, use a template based system or even concatenate the
file or use an XSLT to transform it.
Just something worth bearing in mind (and I'm not saying you CAN'T make the
class attribute variable - I just don't know whether you can) . . .
Best Wishes,
Peter
On 7/3/07 10:02 AM, "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!
>