External interceptors location

Hi folks,

Is it possible to set an external interceptors location in coldbox.cfc? I'm looking for a way to centrally store all of my interceptors?

Thanks.

Nolan Dubeau

Load *.*,8,1

interceptors can be anywhere
Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

I usually have a global mapping called ‘shared’ and simply reference my interceptor like so:

‘shared.interceptors.fooBar’.

Thanks.

Aaron Greenlee
http://aarongreenlee.com/

Thanks guys. Makes sense. Conventions would be handy too

Second question. If I manually announce an interception is it possible to have two or multiple interceptor methods respond to the announcement? Thanks.

Nolan Dubeau

Load .,8,1

Yes. ColdBox learns what interceptors listen for when they are constructed and executes framework and custom interception points in the interceptor order you define within your config. Order is important when you register your interceptors.

Aaron Greenlee
http://aarongreenlee.com/

Nolan,

Check out my blog post on Custom Interception Points.

http://blog.coldbox.org/post.cfm/custom-interception-points-in-coldbox

This should show you how to do this exact thing.

Curt Gratz
Computer Know How

HI Curt,

Great Post! I really see the power of interception chaining after watching the video. Thanks for sending that along.

Nolan

Interceptors are amazing!! I love that feature!! Another great way to extend your apps, I do this all the time. Let’s say you are building a blog and you reach the comments section and you do this:

#announceInterception(“beforeComments”, data)#

Comments Here

#announceInterception(“afterComments”,data)#

With this you can use the interceptor’s output buffer to send output back to the caller in an elegant manner. The buffer also chains with the interceptors as they fire one by one. This allows you a very elegant way to produce content on the screen exactly where you want in an event-driven paradigm approach.

Luis F. Majano
President
Ortus Solutions, Corp

ColdBox Platform: http://www.coldbox.org
Linked In: http://www.linkedin.com/pub/3/731/483
Blog: http://www.luismajano.com
IECFUG Manager: http://www.iecfug.com

The only problem I have with this Video is that it is too small and doesn't
use focus areas to zoom into the important focused area.

Otherwise I may as well just be listening to a podcast, with blurred images.

Regards,
Andrew Scott
http://www.andyscott.id.au/

View it on vimeo and you can watch it HD. Vimeo limits the quality when embedded on external sites.

Nolan Dubeau

Load *.*,8,1