AGGHHH! Oh my. Well ... what can I say, other than thank you?
Yes, a simple type="" attribute added to the template.website event
handler does the trick. {sigh}
Thank you thank you to you both.
garence
On Aug 20, 3:11 pm, Ezra Parker <[email protected]> wrote:
> I think Dan has hit the nail on the head here: the template.website
> event-handler is "inheriting" the default type of
> website.templatedevent, which calls the template.website event in a
> result, thus causing an infinite loop.
>
> Try giving another type to the template.website event-handler, or
> moving it into a separate event-handlers block.
>
> --
> Ezra
>
> On Thu, Aug 20, 2009 at 1:03 PM, Gary
>
> H-S<[email protected]> wrote:
>
> > OK ...http://modelglue.pastebin.com/m490a63b2
>
> > If other code is needed, just say the word; I'll keep my eyes on this
> > thread for a while.
>
> > Much thanks!
>
> > garence
>
> > On Aug 20, 2:55 pm, Dan Wilson <[email protected]> wrote:
> >> Paste herehttp://modelglue.pastebin.com/yourXML configuration that
> >> results in the "request has exceeded the allowable time limit Tag:
> >> cfoutput"
> >> I'm guessing you have an unintentional circular reference, endless loop or
> >> recursion.
>
> >> DW
> >> On Thu, Aug 20, 2009 at 3:42 PM, Gary H-S
> >> <[email protected]
>
> >> > wrote:
>
> >> > Ezra -
>
> >> > Much thanks for your reply ... I did try that, make an event handler
> >> > for the layout template and include it in the event type as a result.
> >> > But the result was, and still is, an error message:
>
> >> > The request has exceeded the allowable time limit Tag: cfoutput
>
> >> > Oddly, when I include the template as a view (in example above), I do
> >> > not get this error.
>
> >> > Ideas? Suggestions?
>
> >> > garence
>
> >> > On Aug 20, 1:04 pm, Ezra Parker <[email protected]> wrote:
> >> > > Hi Garence,
>
> >> > > From your XML config, it appears that templates/website.cfm is your
> >> > > layout "container", correct? If so, then you should be able to resolve
> >> > > this issue by creating an event handler for the template view, and
> >> > > calling it via a result in your event-type, like so:
>
> >> > > <!-- New event-handler for layout template. -->
> >> > > <event-handler name="template.website">
> >> > > <views>
> >> > > <include name="website"
> >> > > template="templates/website.cfm"
> >> > />
> >> > > </views>
> >> > > </event-handler>
>
> >> > > Remove the corresponding <include> from the <after> block of the
> >> > > event-type, and add a result instead:
>
> >> > > <results>
> >> > > <result do="template.website" />
> >> > > </results>
>
> >> > > This will ensure that the "website" view is processed last so it can
> >> > > assemble the other views from the viewCollection.
>
> >> > > HTH,
>
> >> > > --
> >> > > Ezra
>
> >> > > On Thu, Aug 20, 2009 at 6:32 AM,
>
> >> > > garence<[email protected]> wrote:
>
> >> > > > I have run into a problem with using an event type that leverages a
> >> > > > result to display a view.
>
> >> > > > I have a default event type that checks one's login status and, based
> >> > > > on that result, either displays a link to login ("website.loginlink")
> >> > > > or a personalized greeting ("website.salutation"). It looks like
> >> > > > this ...
>
> >> > > > <event-type name="website.defaultevent">
> >> > > > <before>
> >> > > > <broadcasts>
> >> > > > <message name="auth.checkLoginStatus" />
> >> > > > </broadcasts>
> >> > > > <results>
> >> > > > <result name="isLoggedIn"
> >> > do="website.salutation" />
> >> > > > <result name="notLoggedIn"
> >> > do="website.loginlink" />
> >> > > > </results>
> >> > > > </before>
> >> > > > <after>
> >> > > > <views>
> >> > > > <include name="title" template="pages/title.cfm" />
> >> > > > <include name="banner" template="pages/banner.cfm">
> >> > > > <value name="xe.home" value="website.home" />
> >> > > > <value name="xe.childcare" value="website.childcare" /
>
> >> > > > </include>
> >> > > > <include name="navbar" template="pages/navbar.cfm">
> >> > > > <value name="xe.home" value="website.home" />
> >> > > > <value name="xe.ourstaff" value="website.ourstaff" />
> >> > > > <value name="xe.ourphilosophy"
> >> > > > value="website.ourphilosophy" />
> >> > > > </include>
> >> > > > <include name="navbar2" template="pages/navbar2.cfm">
> >> > > > <value name="xe.blog" value="blog.home" />
> >> > > > <value name="xe.lunchmenu" value="website.lunchmenu" /
>
> >> > > > <value name="xe.calendar" value="website.calendar" />
> >> > > > <value name="xe.directory" value="website.directory" /
>
> >> > > > </include>
> >> > > > <include name="website" template="templates/website.cfm" /
>
> >> > > > </views>
> >> > > > </after>
> >> > > > </event-type>
>
> >> > > > The event handlers noted in the results are ...
>
> >> > > > <event-handler name="website.salutation" type="">
> >> > > > <broadcasts>
> >> > > > <message name="getSalutation" />
> >> > > > </broadcasts>
> >> > > > <views>
> >> > > > <include name="salutation"
> >> > template="pages/salutation.cfm">
> >> > > > <value name="xe.logout" value="auth.logout" />
> >> > > > </include>
> >> > > > </views>
> >> > > > </event-handler>
>
> >> > > > <event-handler name="website.loginlink" type="">
> >> > > > <views>
> >> > > > <include name="salutation"
> >> > template="pages/loginlink.cfm">
> >> > > > <value name="xe.login"
> >> > > > value="website.loginform"
> >> > />
> >> > > > </include>
> >> > > > </views>
> >> > > > </event-handler>
>
> >> > > > When, as an anonymous site visitor, I run an event (i.e.
> >> > > > "website.home") that is included in an event handlers block that has
> >> > > > a
> >> > > > default event type equal to "website.defaultevent", only the view
> >> > > > from
> >> > > > the "website.loginlink" event displays in the browser.
>
> >> > > > <event-handler name="website.home">
> >> > > > <views>
> >> > > > <include name="body" template="pages/home.cfm">
> >> > > > <value name="xe.home" value="website.home" />
> >> > > > <value name="xe.didyouknow" value="website.didyouknow" />
> >> > > > <value name="xe.referafamily" value="website.refer-a-
> >> > > > family" />
> >> > > > <value name="xe.parenttestimonials"
> >> > > > value="website.parenttestimonials" />
> >> > > > <value name="xe.one2onefaq" value="website.one2onefaq" />
> >> > > > </include>
> >> > > > </views>
> >> > > > </event-handler>
>
> >> > > > If I comment out the results block in the "website.defaultevent"
> >> > > > event
> >> > > > type, reinit the app, and refresh the page, then all other views run
> >> > > > as expected and display in the browser.
>
> >> > > > My question ... How do I use a result in an event type to run another
> >> > > > event that displays a view, and include the view in the called event
> >> > > > handler?
>
> >> > > > Or maybe better asked, what is the better way to handle this via MG?
>
> >> > > > garence
>
> >> --
> >> “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
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---