On Wed, Mar 24, 2010 at 5:24 PM, denstar <[email protected]> wrote:

> On Wed, Mar 24, 2010 at 3:10 PM, Dennis Clark wrote:
> ...
> > framework's ColdSpring.xml and again in my Application.cfc. This is a bit
> of
> > a "chicken and egg" problem so I doubt there is an elegant solution for
> it.
>
> Someone mentioned using the built-in XML capabilities of, um, XML to
> pull in stuff from other places on the ColdSpring list.
>

Interesting. I don't think we can use XML entities with this problem, but
your train of thought did remind me about ColdSpring's dynamic properties.
It's supported by Model-Glue but it's not documented very well. Something
like this (not tested yet, use at your own risk)...

Application.cfc:

onRequestStart(String thePage) {
    ...
    request.frameworkColdSpringProperties = { reloadKey="den",
reloadPassword="star" };

    if (StructKeyExists(url,request.frameworkColdSpringProperties.reloadKey)
and url[frameworkColdSpringProperties.reloadKey]
eq frameworkColdSpringProperties.reloadPassword) {
        onApplicationStart();
    }
}


Index.cfm:

<cfset ModelGlue_LOCAL_COLDSPRING_DEFAULT_PROPERTIES =
request.frameworkColdSpringProperties />


config/ColdSpring.xml:

<bean id="modelglue.modelGlueConfiguration"
class="ModelGlue.gesture.configuration.ModelGlueConfiguration">

...
<property name="reloadKey"><value>${reloadKey}</value></property>
<property name="reloadPassword"><value>${reloadPassword}</value></property>
...

</bean>



I'll try this out some time soon and let you know how it goes.

Cheers,

-- Dennis

-- 
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

To unsubscribe from this group, send email to 
model-glue+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to