That explains it.

Thanks Ezra.

Is there a group or committee that works on the sample apps? it is a
bit frustrating to jump on MG all excited about new features and such
and then have the sample apps bomb on you.

I'm not complaining (too much), but if there's an entity like that I'd
like to see how I can help to keep those samples apps in sync with
what the framework offers.

Fernando


On Mar 3, 12:20 pm, Ezra Parker <[email protected]> wrote:
> Hi Fernando,
>
> In their earliest incarnation, event types were created via CFCs
> rather than defined in the MG XML, and the sample actionpacks both
> contain examples of this implementation. (As a side note, this is
> something that I personally would like to deprecate and ultimately
> remove in favor of always specifying event types in XML).
>
> So the MainTemplateEvent CFC is indeed defining an event type for the
> actionpack -- in XML, it would look like this:
>
> <event-types>
>         <event-type name="MainTemplateEvent">
>                 <after>
>                         <results>
>                                 <result do="template.main" />
>                         </results>
>                 </after>
>         </event-type>
> </event-types>
>
> HTH,
>
> --
> Ezra Parker
>
> On Wed, Mar 3, 2010 at 7:40 AM, Fernando Lopez <[email protected]> wrote:
> > I started looking into MG3 and Action Packs recently and I went
> > through the installation of the ActionPacks Sample app. After finding
> > a couple issues that I'll explain in a separate entry I got the sample
> > application to work.
>
> > Now I'm going through the code and the first thing I see under /
> > modelgluesamples/actionpacks/config/modelglue.xml
>
> > is this
> > &lt;event-handler name="page.index"
> > type="modelglueactionpacks.common.event.MainTemplateEvent"&gt;
> >                &lt;views&gt;
> >                        &lt;include name="body" template="pages/index.cfm" 
> > /&gt;
> >                &lt;/views&gt;
> > &lt;/event-handler&gt;
>
> > I thought that the attribute "type" in an event-handler would have a
> > value from the &lt;event-Types&gt; section of the XML. but I looked
> > under the /modelglueactionpacks/common and /modelglueactionpacks/
> > usermanagement and I cannot see any event-type defined as
> > "modelglueactionpacks.common.event.MainTemplateEvent" I do however see
> > a MainTemplateEvent.cfc defined at that location.
>
> > Contents of that CFC are below.
>
> > Could anybody explain what is happening and why the event handler type
> > is pointing to a CFC instead of a event-type??
>
> > If I'm missing something I'd be grateful to whoever can explain what
> > it is that I'm missing.
>
> > Fernando
>
> > --------------------------
> > modelglueactionpacks/common/event/MainTemplateEvent
> > --------------------------
>
> > <cfcomponent extends="ModelGlue.gesture.eventhandler.EventHandler">
>
> > <cffunction name="afterConfiguration" access="public"
> > returntype="void" output="false" hint="Called after configuring the
> > event handler.  Subclasses can use this to add messages, results, or
> > views after they're added by something like a ModelGlue XML file.">
> >        <cfset var result = createObject("component",
> > "ModelGlue.gesture.eventhandler.Result") />
>
> >        <cfset result.event = "template.main" />
>
> >        <cfset addResult(result) />
> > </cffunction>
>
> > </cfcomponent>
>
> > --
> > 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

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