Brian
Couple reasons...
I want some properties defined dynamically, depending on the
environment I'm on.  The EnvironmentProperty.cfc works perfectly for
this.
Second I load the ViewHelper.cfc to contain methods that I want to
call in support of displaying content in view .cfm files.
If you referred to the AppProperty.cfc that I've abandoned for now
until such time I need s onApplicationStart properties that the mach-
ii.xml can't easily handle, like dynamic values.
So I now load my ViewHelper.cfc as a "type" in the properties section
of the mach-ii.xml along with the EnvironmentProperty.cfc file.  All
is working happily for now.

Adam
You are right, I didn't need the DSN in the ViewHelper.cfc.  If I need
a method that does, it makes better sense to put that into a DAO or
Gateway component as you indicated.

Thanks all.  Have a good weekend!

On Jun 5, 6:22 am, Brian FitzGerald <[email protected]> wrote:
> Teaman,
>
> Why not just keep things simple and define a few static properties in
> your mach-ii.xml config file with paths to your various resources?
>
> <property name="iconPath" value="library/images/icons" />
> <property name="rootPath" value="/myApp" />
> <property name="styleSheetPath" value="library/styleSheets" />
>
> And then reference the properties in your views/listeners/filters/
> plugins as required using getProperty("iconPath")?  Or maybe I'm
> missing something and you need something more dynamic here.
>
> Brian
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to Mach-II for CFML list.
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/mach-ii-for-coldfusion?hl=en
SVN: http://greatbiztoolsllc.svn.cvsdude.com/mach-ii/
Wiki / Documentation / Tickets: 
http://greatbiztoolsllc.trac.cvsdude.com/mach-ii/
-~----------~----~----~----~------~----~------~--~---

Reply via email to