Sure, this may not be the best way to do things, but here is what is
going on.

I have a number of sites running off the same model glue application,
and each one has a unique model-glue cfapplication created when they
are first loaded.  A bunch of cfcs and some other stuff are loaded by
the init() method in the controller.  One item in here is the value
for the unique "theme".  In the interest of speeding things up, this
stuff is NOT reloaded each time.

So, if the user updates their settings for what "theme" they have for
their site, it will save it to the database, but CFC's have already
been saved into memory with the old theme values....so the look and
feel of their site doesn't change until the next time their site is
reloaded.

Although, as I write this perhaps I could just reload just the cfc's
affected by the themes.  I'll have to check into that.  Although there
are a few places where similar behavior can occur, so I figured it
would be easier to just reload the whole application (it only takes a
second or two - its a relatively small app) and be sure.

-Jeff


On May 26, 3:31 pm, Dan Wilson <[email protected]> wrote:
> You should use the http redirect method.
>
> So much goes on during application initialization that you would need
> a new http request anyways.
>
> You know,  wanting to reload the application from a controller is a
> very odd and never before heard request. I know you said something
> earlier about a user setting, would you please elaborate on the
> specifics?
>
> Maybe you have an interesting use case we might want to consider from
> a Framework perspective.
>
> Dan
>
> On 5/26/09, Jeff Gladnick <[email protected]> wrote:
>
>
>
>
>
> > So is there a way to reload the app from within the controller?
> > Anyone?  Or should I just use the cfttp method?
>
> > On May 25, 7:47 pm, Jeff Gladnick <[email protected]> wrote:
> >> not necessarily - the reload call would not be made from the init.
> >> You'd have to call a specific event which would reload the app.
>
> >> On May 25, 6:13 pm, Chris Peterson <[email protected]> wrote:
>
> >> > wouldn't reloading from the controller then recreate said controller,
> >> > which would then invoke the reload event, which would recreate the
> >> > controller, which would..... oh no I just went cross-eyed
>
> >> > Sent from teh phone
>
> >> > On May 25, 2009, at 8:12 PM, Jeff Gladnick <[email protected]>
> >> > wrote:
>
> >> > > Yeah,
>
> >> > > I considered that, but was hoping there was a way to call it
> >> > > internally intead of via the url
>
> >> > > On May 25, 2:23 pm, Sean Coyne <[email protected]> wrote:
> >> > >> hmm not sure its really the best way to reload the app, but you could
> >> > >> do it by doing a cfhttp call to your domain and use the reload key/
> >> > >> password.
>
> >> > >> so <cfhttp url="http://my.domain.com/mgapp/?init=1"; method="get" />
>
> >> > >> Or even a cflocation call.
>
> >> > >> That said seems to me to be an awkward place to reload the app.
>
> >> > >> Sean
>
> >> > >> On May 25, 4:07 pm, jeff <[email protected]> wrote:
>
> >> > >>> Is it possible to reload the entire MG (unity) application from
> >> > >>> within
> >> > >>> the controller?
>
> --
> “Come to the edge, he said. They said: We are afraid. Come to the
> edge, he said. They came. He pushed them and they flew.”
>
>  Guillaume Apollinaire quotes
--~--~---------~--~----~------------~-------~--~----~
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