As Dan indicated, there are ways to get at the entire set of event
handlers, but this isn't exposed directly. Do you actually need a
list/array of all the event names, or would checking to see if a
particular event name exists be sufficient?

If the latter is the case, then the hasEventHandler() method *should*
work, as it turns around and calls hasEventHandlerDefinition() on the
module loader array, and therefore it shouldn't matter whether the
event handler in question has been loaded yet.

--
Ezra Parker


On Tue, Jan 10, 2012 at 5:31 AM, Dan Wilson <[email protected]> wrote:
> The XMLModuleLoader.cfc is probably where you want to look.
>
> If you want a list of event handlers, you can look at the
> method, listEventHandlers. This is designed to deal only with a single XML
> config, but you can simply expand the logic to read in all of your files and
> list them.
>
> The method, hasEventHandlerDefinition, will look through all of the MG
> config files and try to find instances of a specific event name. You may be
> able to copy this logic to print out all of the Event Handler names.
>
> This CFC is not available in the public Model Glue namespace. You can get
> access to the loaded XML files though by injecting the bean
> modelglue.ModelGlue into your own CFC and calling: getModuleLoaderArray().
>
>
> DW
>
>
>
> On Tue, Jan 10, 2012 at 12:52 AM, Joel Tobey <[email protected]> wrote:
>>
>> I'm doing some fancy SES URL magic and I'm trying to determine what event
>> name I want to use. It's fun because '/foo' is a different event than
>> '/foo/bar'. (Where one might think the later is still the '/foo' event with
>> the variable 'bar')
>>
>> My first thought to do this is to run some logic against the full list of
>> event handler names, but I'm having trouble finding where to do that. The
>> _mg.hasEventHandler() method seems to be the one, but it only checks for
>> loaded event handler objects. Since MG lazy inits, not all of the event
>> handlers load during the init.
>>
>> Can someone help me with accessing the list of event handlers from my XML
>> file? Or if you have another solution to what I'm trying to do?
>>
>> Thanks!
>>
>> --
>> 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
>
>
>
>
> --
> Plutarch - "The mind is not a vessel to be filled but a fire to be kindled."
>
> --
> 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