On Mon, Feb 9, 2009 at 10:05 PM, Tony Nelson wrote:
>
> Or you could create a new config bean that extends the MG config bean.
Or something like this:
<cffunction name="setConfigSetting" access="public" return="any"
output="false" hint="I set a config setting.">>
<cfargument name="name" required="true" type="string">
<cfargument name="value" required="true" type="string">
<cfset variables.config[arguments.name] = arguments.value />
</cffunction>
<cffunction name="testConf">
<cfset var initStruct = structNew() />
<cfset initStruct.fart = "brain" />
<cfset config =
createObject("component","modelglue.Bean.CommonBeans.SimpleConfig").init()
/>
<cfset config.setConfig(initStruct) />
<cfset config.setConfigSetting = setConfigSetting />
<cfset debug(config.getConfig()) />
<cfset config.setConfigSetting("fart","freeze") />
<cfset debug(config.getConfig()) />
</cffunction>
Using AOP would be the best, tho, IMHO.
:DeN
--
Small amounts of philosophy lead to atheism, but larger amounts bring
us back to God.
Francis Bacon
--~--~---------~--~----~------------~-------~--~----~
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
For more about Model-Glue, check http://www.model-glue.com .
-~----------~----~----~----~------~----~------~--~---