Of course it would. That's how results work. You generally want to add
things to the queue and execute them.

Specifically, if you want to stop processing and only process the event
handler, you want to use the redirect attribute:

http://docs.model-glue.com/wiki/ReferenceMaterials/ModelGlueXmlReference#result


This:

                               <result name="MaintenanceModeEvent"
do="MaintenanceMode" />

Becomes this:

                               <result name="MaintenanceModeEvent"
do="MaintenanceMode" redirect="true" />



DW


On Tue, Nov 2, 2010 at 2:19 PM, jet <[email protected]> wrote:

> Ok trying it out again, but it's not quite doing what i need it to
> do.  So i got
>
>                <event-handler name="ModelGlue.onRequestStart">
>                        <broadcasts>
>                                <message name="CheckMaintenanceMode" />
>                        </broadcasts>
>                        <results>
>                                <result name="MaintenanceModeEvent"
> do="MaintenanceMode" />
>                        </results>
>                </event-handler>
>
>                 <event-handler name="MaintenanceMode">
>                        <views>
>                                <include name="template"
> template="sitedown.cfm" />
>                        </views>
>                </event-handler>
>
> And this aint working so I'm obviously missing something.
> ModelGlue.onRequestStart gets picked up and it will trigger the
> CheckMaintenanceMode, it does include the sitedown.cfm but instead of
> stopping here it continues on to trigger anything else that was in the
> queue so as a result the site behaves normally.
>
> On Nov 1, 3:22 pm, jet <[email protected]> wrote:
> > Yes and making an exception for my ip would be ideal, so that i can
> > confirm that the changes are working correctly.  Thanks.
> >
> > On Nov 1, 3:20 pm, jet <[email protected]> wrote:
> >
> > > Thanks for all the replies.  I gave Dan's example a shot but wasnt
> > > being successful.  I might have missed something.  But since I was in
> > > a bit of a rush to get something up and running I just created events
> > > to handle my template pages.  Site only had 2 main template pages so i
> > > jsut created events for those that would use my maintenance template,
> > > and renamed my original events to something else.
> >
> > > After i was done with teh maintenane i just switched the names of the
> > > events back to what they were.  Not the cleanest but it did the job.
> > > I'll try it out again later.
> >
> > > On Oct 30, 8:39 am, Jim Priest <[email protected]> wrote:
> >
> > > > On Sat, Oct 30, 2010 at 5:28 AM, Chris Blackwell <[email protected]>
> wrote:
> > > > > I'd do this at the webserver level, using mod_rewrite or the iis
> equivalent
> > > > >
> http://www.techiecorner.com/97/redirect-to-maintenance-page-during-up...
> >
> > > > I've done this with Ant in my deployment scripts - flip a bit and use
> > > > something similar to Dan's example to redirect traffic.
> >
> > > > You may also want to bake some logic in there so that you (or your IP
> > > > range) is NOT redirected - this enables you to hit the site, verify
> > > > things are working, reload the framework, etc.
> >
> > > > Jim
> >
> > > > --
> > > > Jim Priest | jimpriest.net | [email protected] | 919-827-1970-
> Hide quoted text -
> >
> > > - Show quoted text -
>
> --
> 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]<model-glue%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/model-glue?hl=en
>



-- 
William Osler - "We are here to add what we can to life, not to get what we
can from life."

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

Reply via email to