I tend to have a ViewConfig bean which would contain things exactly like
thumbnail dir's.  I use MG's onRequestStart mesage (not to be confused with
application.cfc) to always add this to the event.

Chris

2008/12/3 Sean Coyne <[EMAIL PROTECTED]>

>
> You can create an object in the ColdSpring configuration to hold that
> kind of information.  MG comes w/ a SimpleConfig bean to make this
> easier.
> create it like so:
>
> <bean id="Config" class="ModelGlue.Bean.CommonBeans.SimpleConfig">
>                <property name="Config">
>                        <map>
>                                <entry
> key="SomeKey"><value>somevalue</value></entry>
>                                <entry
> key="thumbNailPhotoDir"><value>/img/thumb/</value></entry>
>                        </map>
>                </property>
>        </bean>
>
> then in the controller you can get it like so:
>
> getModelGlue().getBean('Config').getConfigSetting('thumbNailPhotoDir')
>
> once you have it in the controller, you can set the value in the Event
> object which will make its way to the ViewState (MG2) so you can use
> it in your views.
>
> Sean
>
>
>
>
>
> On Dec 3, 3:51 am, HillSlug <[EMAIL PROTECTED]> wrote:
> > I've completed Dan Wilson's MG tutorial and have to say it's pretty
> > good.
> > In playing around with it, I wanted to extend it with some graphics.
> >
> > I know in my old way of procedural programming, I would do something
> > simple like this:
> > Application.cfm:
> >
> > <cfset application.thumbNailPhotoDir = "images/users/thumb/">
> >
> > And then just call <img src=#application.thumbNailPhotoDir#">
> > throughout my application.
> >
> > I was curious as to how I would translate this to using Coldspring and
> > then passing it to my viewstate?
> >
> > I'm a little lost and could use some assistance.
> >
> > thank you everyone for your help.
> >
>

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

Reply via email to