Firing off Coldbox event from procedural code.

Hi folks,

I’m a relative n00b to Coldbox so maybe this question is amateur at best.

Anyway, I am trying to fire off a coldbox event during the processing of some procedural ColdFusion code.

I am trying to use the coldbox proxy object method to accomplish this by calling a handler event inside a module through the proxy method.

something like this

  1. alertHandler = getController().getHandlerService().getHandler(‘alerts:alert’, rc);
  2. alertHandler.refreshAlertCounts();

Line 1 results is the error:

Either there are no methods with the specified method name and argument types or the getRunnable method is overloaded with argument types that ColdFusion cannot decipher reliably. ColdFusion found 0 methods that match the provided arguments. If this is a Java object and you verified that the method exists, use the javacast function to reduce ambiguity.

Is this the way I should be going about trying to accomplish something like this? and what am I missing?

Thanks for your patience. :slight_smile:
Justin

If you want to use a proxy CFC (one that extends the base coldbox.system.remote.ColdBoxProxy class) then you just need to call the process() method like so:

process( ‘handlerName.eventName’ );

That said, the error you pasted below seems to be unrelated and part of a java call somewhere in your own code.

Thanks!

~Brad

ColdBox/CommandBox Developer Advocate
Ortus Solutions, Corp

E-mail: brad@coldbox.org
ColdBox Platform: http://www.coldbox.org
Blog: http://www.codersrevolution.com