Hi All,
"Model-Glue 3 introduces the concept of an Event Type. Much like Types in
Object Oriented Programming, an Event Type contains specific behavior and
is addressable by a specific name. Event Types in Model-Glue can contain
behavior that is executed BEFORE, AFTER or BEFORE and AFTER an Event is
executed."
So I started playing around it like following.
I have added "event-type" in my "modelglue.xml" add added one result tag
under before.
At this point I expect that model-glue will first execute the event "
SomethingThatShouldRunBefore" which is inside "result" tag and then my
event which is "default" and at last it will render the views inside "after"
but what is happening model glue is only executing "
SomethingThatShouldRunBefore".
My question is why rest of my event is not getting executed?
Am I misunderstanding the meaning of the tags?
Can anybody tell me what I need to do to execute rest of my event?
<event-types>
<event-type name="templatedPage">
<before>
<results>
<result do="SomethingThatShouldRunBefore"/>
</results>
</before>
<after>
<views>
<include name="navigation" template="layout/Layout.Navigation.cfm">
<value name="xe_ShipmentList" value="Shipment.List" />
</include>
<include name="message" template="layout/Layout.MessageBox.cfm" />
<include name="footer" template="layout/Layout.Footer.cfm" />
<include name="main" template="layout/Master.Layout.cfm" />
</views>
</after>
</event-type>
</event-types>
<event-handlers defaultType="templatedPage">
<!-- A homepage for your application. -->
<event-handler name="default">
<views>
<include name="primary" template="primary.cfm" />
</views>
</event-handler>
<!-- An error event to show when an error occurs, much like <cferror>. -->
<event-handler name="page.error">
<views>
<include name="primary" template="layout/Master.Exception.cfm" />
</views>
</event-handler>
<!-- A "404" event to show when the requested event isn't defined. -->
<event-handler name="page.missing">
<broadcasts />
<views>
<include name="primary" template="layout/Master.MissingEvent.cfm" />
</views>
</event-handler>
</event-handlers>
<event-handlers>
<event-handler name="SomethingThatShouldRunBefore">
<views>
<include name="primary" template="secondary.cfm" />
</views>
</event-handler>
</event-handlers>
A Second try:-
In my second try I just change the content of "before" tag like following
<before>
<!--<results>
<result do="SomethingThatShouldRunBefore"/>
</results>-->
<views>
<include name="primary" template="secondary.cfm" />
</views>
</before>
Now It seems that my event is getting executed but problem is that the view
inside "before" is not getting rendered.
Can anyone help me to render the view inside "before"(secondary.cfm)?
Thanks
Saurav
--
--
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
---
You received this message because you are subscribed to the Google Groups
"model-glue" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.